pero 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pero/cli.rb +4 -2
- data/lib/pero/history.rb +1 -1
- data/lib/pero/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 103d891b1713c5264fa52107389bedf8b5b8aa3a2ff4139a438a0cd335ce3376
|
4
|
+
data.tar.gz: fcbb6995fec0b668f77f4b590ba3e91fd1dba55df920f620d85660a43e7f58d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72b02283c6e5963f9d7944b476b9ec7b0004cb9bda9db7a90da1fea72761ba65099165d886ec3d7751bb97097154e8f078107892e27585a9436a5c7e2ae4434b
|
7
|
+
data.tar.gz: 5f44729bd0d480a61a6eae0bf050b8157d0231c1f3fce33a31cab47ae63e6c11451c2fbd22a9f3fbc605c8cb4522543a1c20f9adb0cea579c3332de32eccd888
|
data/lib/pero/cli.rb
CHANGED
@@ -61,7 +61,7 @@ module Pero
|
|
61
61
|
return unless nodes
|
62
62
|
Parallel.each(nodes, in_process: options["concurrent"]) do |n|
|
63
63
|
opt = n["last_options"].merge(options)
|
64
|
-
opt["environment"] = "production" if opt["environment"].empty?
|
64
|
+
opt["environment"] = "production" if opt["environment"].nil? || opt["environment"].empty?
|
65
65
|
if options["image-name"]
|
66
66
|
opt.delete("server-version")
|
67
67
|
else
|
@@ -71,6 +71,7 @@ module Pero
|
|
71
71
|
puppet.apply
|
72
72
|
end
|
73
73
|
rescue => e
|
74
|
+
Pero.log.error e.backtrace.join("\n")
|
74
75
|
Pero.log.error e.inspect
|
75
76
|
end
|
76
77
|
end
|
@@ -81,7 +82,7 @@ module Pero
|
|
81
82
|
option "node-name", aliases: '-N', default: "", type: :string, desc: "json node name(default hostname)"
|
82
83
|
def bootstrap(*hosts)
|
83
84
|
begin
|
84
|
-
options["environment"] = "production" if options["environment"].empty?
|
85
|
+
options["environment"] = "production" if options["environment"].nil? || options["environment"].empty?
|
85
86
|
Parallel.each(hosts, in_process: options["concurrent"]) do |host|
|
86
87
|
raise "unknown option #{host}" if host =~ /^-/
|
87
88
|
puppet = Pero::Puppet.new(host, options)
|
@@ -90,6 +91,7 @@ module Pero
|
|
90
91
|
puppet.install
|
91
92
|
end
|
92
93
|
rescue => e
|
94
|
+
Pero.log.error e.backtrace.join("\n")
|
93
95
|
Pero.log.error e.inspect
|
94
96
|
end
|
95
97
|
end
|
data/lib/pero/history.rb
CHANGED
@@ -21,7 +21,7 @@ module Pero
|
|
21
21
|
class History
|
22
22
|
class Attribute
|
23
23
|
def initialize(specinfra, options)
|
24
|
-
name = if options["node-name"].empty?
|
24
|
+
name = if options["node-name"].nil? || options["node-name"].empty?
|
25
25
|
specinfra.run_command("hostname").stdout.chomp
|
26
26
|
else
|
27
27
|
options["node-name"]
|
data/lib/pero/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pyama86
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|