From 931e23c5d03a271371a5358d6cd3dd2eb9088ca4 Mon Sep 17 00:00:00 2001 From: Fabian Ruff Date: Tue, 5 Feb 2013 13:53:34 +0100 Subject: [PATCH] add verbose_logging config option to chef based provisioners Conflicts: plugins/provisioners/chef/config/base.rb --- plugins/provisioners/chef/config/base.rb | 3 +++ plugins/provisioners/chef/provisioner/base.rb | 1 + templates/provisioners/chef_client/client.erb | 1 + templates/provisioners/chef_solo/solo.erb | 1 + 4 files changed, 6 insertions(+) diff --git a/plugins/provisioners/chef/config/base.rb b/plugins/provisioners/chef/config/base.rb index edc4cd1fb..7fffc32fd 100644 --- a/plugins/provisioners/chef/config/base.rb +++ b/plugins/provisioners/chef/config/base.rb @@ -21,6 +21,7 @@ module VagrantPlugins attr_accessor :run_list attr_accessor :file_cache_path attr_accessor :file_backup_path + attr_accessor :verbose_logging def initialize super @@ -42,6 +43,7 @@ module VagrantPlugins @provisioning_path = UNSET_VALUE @file_cache_path = UNSET_VALUE @file_backup_path = UNSET_VALUE + @verbose_logging = UNSET_VALUE @json = {} @run_list = [] @@ -65,6 +67,7 @@ module VagrantPlugins @provisioning_path = nil if @provisioning_path == UNSET_VALUE @file_backup_path = "/var/chef/backup" if @file_backup_path == UNSET_VALUE @file_cache_path = "/var/chef/cache" if @file_cache_path == UNSET_VALUE + @verbose_logging = false if @verbose_logging == UNSET_VALUE # Make sure the log level is a symbol @log_level = @log_level.to_sym diff --git a/plugins/provisioners/chef/provisioner/base.rb b/plugins/provisioners/chef/provisioner/base.rb index 4bb591438..b30de915e 100644 --- a/plugins/provisioners/chef/provisioner/base.rb +++ b/plugins/provisioners/chef/provisioner/base.rb @@ -63,6 +63,7 @@ module VagrantPlugins :file_cache_path => @config.file_cache_path, :file_backup_path => @config.file_backup_path, :log_level => @config.log_level.to_sym, + :verbose_logging => @config.verbose_logging, :http_proxy => @config.http_proxy, :http_proxy_user => @config.http_proxy_user, :http_proxy_pass => @config.http_proxy_pass, diff --git a/templates/provisioners/chef_client/client.erb b/templates/provisioners/chef_client/client.erb index 23c3f68de..7ac87521f 100644 --- a/templates/provisioners/chef_client/client.erb +++ b/templates/provisioners/chef_client/client.erb @@ -1,5 +1,6 @@ log_level <%= log_level.inspect %> log_location STDOUT +verbose_logging <%= verbose_logging.inspect %> <% if node_name %> node_name "<%= node_name %>" <% end %> diff --git a/templates/provisioners/chef_solo/solo.erb b/templates/provisioners/chef_solo/solo.erb index 9ce1be72b..a36b20b42 100644 --- a/templates/provisioners/chef_solo/solo.erb +++ b/templates/provisioners/chef_solo/solo.erb @@ -8,6 +8,7 @@ cookbook_path <%= cookbooks_path.inspect %> role_path <%= roles_path.inspect %> <% end %> log_level <%= log_level.inspect %> +verbose_logging <%= verbose_logging.inspect %> encrypted_data_bag_secret "<%= encrypted_data_bag_secret %>"