lib/chef/provisioning/convergence_strategy/install_msi.rb in chef-provisioning-0.17 vs lib/chef/provisioning/convergence_strategy/install_msi.rb in chef-provisioning-0.18
- old
+ new
@@ -7,11 +7,11 @@
class InstallMsi < PrecreateChefObjects
@@install_msi_cache = {}
def initialize(convergence_options, config)
super
- @install_msi_url = convergence_options[:install_msi_url] || 'http://www.opscode.com/chef/install.msi'
+ @install_msi_url = convergence_options[:install_msi_url] || 'http://www.chef.io/chef/install.msi'
@install_msi_path = convergence_options[:install_msi_path] || "$env:TEMP\\#{File.basename(@install_msi_url)}"
@chef_client_timeout = convergence_options.has_key?(:chef_client_timeout) ? convergence_options[:chef_client_timeout] : 120*60 # Default: 2 hours
end
attr_reader :install_msi_url
@@ -40,13 +40,14 @@
end
def converge(action_handler, machine)
super
- # TODO For some reason I get a 500 back if I don't do -l debug
action_handler.open_stream(machine.node['name']) do |stdout|
action_handler.open_stream(machine.node['name']) do |stderr|
- machine.execute(action_handler, "chef-client -l debug",
+ command_line = "chef-client"
+ command_line << " -l #{config[:log_level].to_s}" if config[:log_level]
+ machine.execute(action_handler, command_line,
:stream_stdout => stdout,
:stream_stderr => stderr,
:timeout => @chef_client_timeout)
end
end