Class: Solid::Commands

Inherits:
Object
  • Object
show all
Includes:
Errors, Json
Defined in:
lib/solid/commands.rb

Constant Summary

Constants included from Errors

Errors::SERVER_REQUIRED, Errors::SSH_AUTH_REQUIRED, Errors::SSH_KEY_REQUIRED, Errors::SSH_PWD_REQUIRED

Instance Method Summary collapse

Constructor Details

#initialize(with_dna_file, &block) ⇒ Commands

Returns a new instance of Commands.



6
7
8
9
10
# File 'lib/solid/commands.rb', line 6

def initialize with_dna_file, &block
  @dna = parse_dna(with_dna_file)
  validate_dna
  self.instance_eval(&block) if block_given?
end

Instance Method Details

#run_chefObject



12
13
14
15
16
# File 'lib/solid/commands.rb', line 12

def run_chef
  @dna["servers"].each do |server|
    run server
  end
end