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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17794a1ffa026b662d06b36840a883a434823c791db1839ef1efba8306238a63
4
- data.tar.gz: af2d15aa1377be5af99b1769c6690adeddba106b51e62eaf20e778566df6a96b
3
+ metadata.gz: 103d891b1713c5264fa52107389bedf8b5b8aa3a2ff4139a438a0cd335ce3376
4
+ data.tar.gz: fcbb6995fec0b668f77f4b590ba3e91fd1dba55df920f620d85660a43e7f58d8
5
5
  SHA512:
6
- metadata.gz: 372e94f0f02059e076ebbbf7976ecc188b9f22a983c6fe0cd788e899f3536c0c99a1728d33df080458b7e21bd7207f5df9d547a373837d19da25da6544d43388
7
- data.tar.gz: 7a4baefe02de81bc4551777fcc785ad1332bf2ee7ede50fd5c1d682dfcb1f5479a32221ccec31c9bae6085964da96d93dafac11c5fce716cd509b4115f4641e1
6
+ metadata.gz: 72b02283c6e5963f9d7944b476b9ec7b0004cb9bda9db7a90da1fea72761ba65099165d886ec3d7751bb97097154e8f078107892e27585a9436a5c7e2ae4434b
7
+ data.tar.gz: 5f44729bd0d480a61a6eae0bf050b8157d0231c1f3fce33a31cab47ae63e6c11451c2fbd22a9f3fbc605c8cb4522543a1c20f9adb0cea579c3332de32eccd888
@@ -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
@@ -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"]
@@ -1,3 +1,3 @@
1
1
  module Pero
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
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.3.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: 2020-10-22 00:00:00.000000000 Z
11
+ date: 2021-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor