class Kitchen::Provisioner::ChefSolo
Chef
Solo provisioner.
@author Fletcher Nichol <fnichol@nichol.ca>
Public Instance Methods
config_filename()
click to toggle source
(see Base#config_filename)
# File lib/kitchen/provisioner/chef_solo.rb, line 43 def config_filename "solo.rb" end
create_sandbox()
click to toggle source
(see Base#create_sandbox
)
Calls superclass method
Kitchen::Provisioner::ChefBase#create_sandbox
# File lib/kitchen/provisioner/chef_solo.rb, line 48 def create_sandbox super prepare_config_rb end
run_command()
click to toggle source
(see Base#run_command
)
# File lib/kitchen/provisioner/chef_solo.rb, line 54 def run_command cmd = sudo(config[:chef_solo_path]).dup .tap { |str| str.insert(0, "& ") if powershell_shell? } chef_cmd(cmd) end
Private Instance Methods
chef_args(solo_rb_filename)
click to toggle source
Returns an Array of command line arguments for the chef client.
@return [Array<String>] an array of command line arguments @api private
# File lib/kitchen/provisioner/chef_solo.rb, line 67 def chef_args(solo_rb_filename) args = [ "--config #{remote_path_join(config[:root_path], solo_rb_filename)}", "--log_level #{config[:log_level]}", "--force-formatter", "--no-color", "--json-attributes #{remote_path_join(config[:root_path], "dna.json")}", ] args << "--logfile #{config[:log_file]}" if config[:log_file] args << "--profile-ruby" if config[:profile_ruby] args << "--legacy-mode" if config[:legacy_mode] args end