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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/opswalrus/bootstrap.ops +11 -1
- data/lib/opswalrus/host.rb +5 -2
- data/lib/opswalrus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9e4b15ff511cbac36450224deb5d3da970aa979be30d468ce9ac07c8b827907
|
4
|
+
data.tar.gz: 531443cdca36130479513f755ef609b017cc109f339d24379f82d7b243da4891
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c728e62baf815b1599413d2b80c6d045b4c5be510c374be1b3a6b7465c7316bc2952ab4bab91031df23bc7b56289cb8c36b320e5cf84a0a523a12a410ff538b8
|
7
|
+
data.tar.gz: 8d804dd1f1b90347e7eddeb43bde790841130d1edd25b1ed632223e7a0ace968b8c80e834829e277d148f245d5bf8b964d92120849f01f8c1f0f8976bb3897c8
|
data/Gemfile.lock
CHANGED
data/lib/opswalrus/bootstrap.ops
CHANGED
@@ -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
|
data/lib/opswalrus/host.rb
CHANGED
@@ -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.
|
93
|
-
|
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)
|
data/lib/opswalrus/version.rb
CHANGED