cheftacular 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cheftacular/actions/run.rb +1 -1
- data/lib/cheftacular/version.rb +1 -1
- data/lib/sshkit/actions/start_task.rb +4 -2
- data/lib/sshkit/monkeypatches.rb +19 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35f8666436a8fa4f83a550017cb2dfc7ae49553f
|
4
|
+
data.tar.gz: 49edd61930e9183efb7bceb3dbeda136172f948e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7faceebadee553a30a409cb2f15ac1c68b6a9534c629668913cb4b8aaa0ec0a37b9bcaf314c70e6fb6b2cf6863ad03c1fe873cb9d3af81e30aca20839b5f94e3
|
7
|
+
data.tar.gz: 78ccbc34c392faffc18a05ee9f45bf34605a34af95b5cc5c1b050c4a8cd1a3628c47da067d368a575600003d2fea7ae2b96102cae744364cbee3ffcc60ad016a
|
data/lib/cheftacular/version.rb
CHANGED
@@ -3,7 +3,7 @@ module SSHKit
|
|
3
3
|
class Netssh
|
4
4
|
def start_task name, ip_address, run_list, command, options, locs, cheftacular, out=""
|
5
5
|
log_loc, timestamp = set_log_loc_and_timestamp(locs)
|
6
|
-
true_env = get_true_environment cheftacular['run_list_environments'],
|
6
|
+
true_env = get_true_environment run_list, cheftacular['run_list_environments'], options['env']
|
7
7
|
|
8
8
|
puts "Running #{ command } for #{ name } (#{ ip_address }) (Run with with --debug to generate a log as well)"
|
9
9
|
|
@@ -20,7 +20,9 @@ module SSHKit
|
|
20
20
|
|
21
21
|
puts out
|
22
22
|
|
23
|
-
|
23
|
+
if out.empty? || ( cheftacular['repositories'][options['repository']].has_key?('not_a_migration_message') && out == cheftacular['repositories'][options['repository']]['not_a_migration_message']
|
24
|
+
puts("Nothing to migrate for #{ options['role'] }...")
|
25
|
+
end
|
24
26
|
|
25
27
|
[out, timestamp] #return out to send to logs_bag
|
26
28
|
end
|
data/lib/sshkit/monkeypatches.rb
CHANGED
@@ -16,4 +16,23 @@ module SSHKit
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
19
|
+
|
20
|
+
module Runner
|
21
|
+
class Parallel < Abstract
|
22
|
+
def execute
|
23
|
+
threads = []
|
24
|
+
hosts.each do |host|
|
25
|
+
threads << Thread.new(host) do |h|
|
26
|
+
begin
|
27
|
+
backend(h, &block).run
|
28
|
+
rescue Exception => e
|
29
|
+
e2 = ExecuteError.new e
|
30
|
+
raise e2, "Exception while executing #{host.user ? "as #{host.user}@" : "on host "}#{host}:\n#{e.message}\n#{ e.backtrace.join("\n") }"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
threads.map(&:join)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
19
38
|
end
|