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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de48354bd1ec85f816c861050cd49feafabdc874
4
- data.tar.gz: 6b7870f9aaf06cc78e48a6628302e64cfdfefe0a
3
+ metadata.gz: 35f8666436a8fa4f83a550017cb2dfc7ae49553f
4
+ data.tar.gz: 49edd61930e9183efb7bceb3dbeda136172f948e
5
5
  SHA512:
6
- metadata.gz: 2c465e268d416e318c181ea3f67bb15aeb554bd5c6f6b96b2cecdeefdb5694b3903e6a007cf9804626a4250cf9fda8f1d124e18eef0353607835e56b265c3fed
7
- data.tar.gz: eea0fd5fd016033c479b5595b25327600f84eb441dc078df685e75be4eec7fc627319ecb1f8c5c6548d8038d758e093ab74ea9a0571863cc3de3af19ed78ef56
6
+ metadata.gz: 7faceebadee553a30a409cb2f15ac1c68b6a9534c629668913cb4b8aaa0ec0a37b9bcaf314c70e6fb6b2cf6863ad03c1fe873cb9d3af81e30aca20839b5f94e3
7
+ data.tar.gz: 78ccbc34c392faffc18a05ee9f45bf34605a34af95b5cc5c1b050c4a8cd1a3628c47da067d368a575600003d2fea7ae2b96102cae744364cbee3ffcc60ad016a
@@ -61,4 +61,4 @@ class Cheftacular
61
61
  raise "You attempted to run a command for the all role, this is not possible."
62
62
  end
63
63
  end
64
- end
64
+ end
@@ -1,5 +1,5 @@
1
1
  class Cheftacular
2
2
  #major_version.minor_version.bugfixes
3
- VERSION = "2.0.2"
3
+ VERSION = "2.0.3"
4
4
  RUBY_VERSION = "2.2.2"
5
5
  end
@@ -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'], run_list, options['env']
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
- puts("Nothing to migrate for #{ options['role'] }...") if out.empty? || out == 'config/local.yml file detected. Its environment variables will be merged on top of those from config/application.yml.'
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
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheftacular
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis Alridge