mofa 0.3.16 → 0.3.17

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.
data/lib/mofa/cli.rb CHANGED
@@ -16,6 +16,7 @@ module Mofa
16
16
  class_option :debug, :type => :boolean, :aliases => '-vv', :desc => 'be very vebose'
17
17
 
18
18
  desc 'provision <cookbook>', 'provisions Targethost(s) using a given cookbook.'
19
+ method_option :ignore_ping, :type => :boolean, :aliases => '-p'
19
20
  method_option :target, :type => :string, :aliases => '-t'
20
21
  method_option :concrete_target, :type => :string, :aliases => '-T'
21
22
  method_option :runlist, :type => :string, :aliases => '-o'
@@ -42,6 +43,7 @@ module Mofa
42
43
  cmd.hostlist = hostlist
43
44
  cmd.runlist_map = runlist_map
44
45
  cmd.attributes_map = attributes_map
46
+ cmd.options = options
45
47
 
46
48
  cmd.prepare
47
49
  cmd.execute
data/lib/mofa/mofa_cmd.rb CHANGED
@@ -4,6 +4,7 @@ require 'net/sftp'
4
4
  class MofaCmd
5
5
  attr_accessor :token
6
6
  attr_accessor :cookbook
7
+ attr_accessor :options
7
8
 
8
9
  def self.generate_token
9
10
  Digest::SHA1.hexdigest([Time.now, rand].join)[0..10]
@@ -61,4 +62,3 @@ class MofaCmd
61
62
  end
62
63
 
63
64
  end
64
-
@@ -142,7 +142,7 @@ class ProvisionCmd < MofaCmd
142
142
  host_index = host_index + 1
143
143
  chef_solo_runs.store(hostname, {})
144
144
 
145
- unless host_avail?(hostname)
145
+ if host_avail?(hostname) == false || options[:ignore_ping] == true
146
146
  chef_solo_runs[hostname].store('status', 'UNAVAIL')
147
147
  chef_solo_runs[hostname].store('status_msg', "Host #{hostname} unreachable.")
148
148
  next
data/lib/mofa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mofa
2
- VERSION = "0.3.16"
2
+ VERSION = "0.3.17"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mofa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.16
4
+ version: 0.3.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: