opswalrus 1.0.44 → 1.0.46

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: 136dbe2cf55aeca23724fc70f4a71f9faaa3cfbda95c5803b3b37e1345a49366
4
- data.tar.gz: e6ea3db8d5e5dcfae279396acd31891907821d92c39e161eed857d23d57b8457
3
+ metadata.gz: d9e4b15ff511cbac36450224deb5d3da970aa979be30d468ce9ac07c8b827907
4
+ data.tar.gz: 531443cdca36130479513f755ef609b017cc109f339d24379f82d7b243da4891
5
5
  SHA512:
6
- metadata.gz: 8fd11f706aa726c93db026d57783d76aa67d9be92021efc2413185d5b35dfc629e21387408d3946119e77a531841510e8991db6c3b5062ccf4cbfcd3e0961367
7
- data.tar.gz: 4b73c62902bbd2583b98beaabac6b36342134b3fe1eab982f978c4f1112e6cd978c45c374929caef5396d77794702ce4015237c3aafc3223b120df8ac10da568
6
+ metadata.gz: c728e62baf815b1599413d2b80c6d045b4c5be510c374be1b3a6b7465c7316bc2952ab4bab91031df23bc7b56289cb8c36b320e5cf84a0a523a12a410ff538b8
7
+ data.tar.gz: 8d804dd1f1b90347e7eddeb43bde790841130d1edd25b1ed632223e7a0ace968b8c80e834829e277d148f245d5bf8b964d92120849f01f8c1f0f8976bb3897c8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opswalrus (1.0.44)
4
+ opswalrus (1.0.46)
5
5
  bcrypt_pbkdf (~> 1.1)
6
6
  binding_of_caller (~> 1.0)
7
7
  citrus (~> 3.0)
@@ -1,5 +1,15 @@
1
1
  # ssh_noprep in: :sequence do
2
2
  ssh_noprep do
3
3
  puts "Bootstrapping #{to_s} (alias=#{self.alias})"
4
- _bootstrap_host()
4
+ stdout, stderr, exit_status = _bootstrap_host()
5
+ if exit_status == 0
6
+ puts "Success - #{to_s} (alias=#{self.alias})"
7
+ else
8
+ stdout_report = stdout.lines.last(3).map {|line| " #{line}" }.join()
9
+ stderr_report = stderr.lines.last(3).map {|line| " #{line}" }.join()
10
+ report = "Failure - #{to_s} (alias=#{self.alias})"
11
+ report << "\n stdout:\n#{stdout_report}" unless stdout_report.empty?
12
+ report << "\n stderr:\n#{stderr_report}" unless stderr_report.empty?
13
+ puts report
14
+ end
5
15
  end
@@ -81,6 +81,7 @@ module OpsWalrus
81
81
  @_host.to_s
82
82
  end
83
83
 
84
+ # returns [stdout, stderr, exit_status]
84
85
  def _bootstrap_host
85
86
  # copy over bootstrap shell script
86
87
  # io = StringIO.new(bootstrap_shell_script)
@@ -89,8 +90,10 @@ module OpsWalrus
89
90
  io.close
90
91
  raise Error, "Unable to upload bootstrap shell script to remote host #{to_s} (alias=#{self.alias})" unless upload_success
91
92
  @_host.execute(:chmod, "755", "tmpopsbootstrap.sh")
92
- @_host.execute(:sh, "tmpopsbootstrap.sh")
93
- @_host.execute(:rm, "-f", "tmpopsbootstrap.sh")
93
+ sshkit_cmd = @_host.execute_cmd(:sh, "tmpopsbootstrap.sh")
94
+ [sshkit_cmd.full_stdout, sshkit_cmd.full_stderr, sshkit_cmd.exit_status]
95
+ ensure
96
+ @_host.execute(:rm, "-f", "tmpopsbootstrap.sh") rescue nil
94
97
  end
95
98
 
96
99
  def _zip_copy_and_run_ops_bundle(local_host, block)
@@ -1,3 +1,3 @@
1
1
  module OpsWalrus
2
- VERSION = "1.0.44"
2
+ VERSION = "1.0.46"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opswalrus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.44
4
+ version: 1.0.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Ellis