diff options
author | Tim Smith <tsmith@chef.io> | 2021-08-02 11:52:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-02 11:52:24 -0700 |
commit | 6f5d7939aa0ee689ead3b12753e4d24f9bbc9864 (patch) | |
tree | c63d90b03e8c8437fec5cdf6170c4e0502163d35 | |
parent | 55e6e3b465f5d794100323e7ca13ac9bd5fcf43d (diff) | |
parent | 4fe60f40fa4613ff3a4e4272b9c1ee2e1acc9772 (diff) | |
download | chef-6f5d7939aa0ee689ead3b12753e4d24f9bbc9864.tar.gz |
Merge pull request #11658 from MsysTechnologiesllc/smriti/11367_knife_bootstrap_against_windows_does_not_respect_config_log_level
knife bootstrap windows: log_level should be updated as in client.rb
-rw-r--r-- | knife/lib/chef/knife/core/windows_bootstrap_context.rb | 4 | ||||
-rw-r--r-- | knife/spec/unit/knife/core/windows_bootstrap_context_spec.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/knife/lib/chef/knife/core/windows_bootstrap_context.rb b/knife/lib/chef/knife/core/windows_bootstrap_context.rb index 8116c50226..f93e6572e3 100644 --- a/knife/lib/chef/knife/core/windows_bootstrap_context.rb +++ b/knife/lib/chef/knife/core/windows_bootstrap_context.rb @@ -86,8 +86,8 @@ class Chef client_rb << "# Using default node name (fqdn)\n" end - if config[:config_log_level] - client_rb << %Q{log_level :#{config[:config_log_level]}\n} + if chef_config[:config_log_level] + client_rb << %Q{log_level :#{chef_config[:config_log_level]}\n} else client_rb << "log_level :auto\n" end diff --git a/knife/spec/unit/knife/core/windows_bootstrap_context_spec.rb b/knife/spec/unit/knife/core/windows_bootstrap_context_spec.rb index ecbb500452..c9c1b84b84 100644 --- a/knife/spec/unit/knife/core/windows_bootstrap_context_spec.rb +++ b/knife/spec/unit/knife/core/windows_bootstrap_context_spec.rb @@ -169,7 +169,7 @@ describe Chef::Knife::Core::WindowsBootstrapContext do echo.file_backup_path "c:/chef/backup" echo.cache_options ^({:path =^> "C:\\\\chef\\\\cache\\\\checksums", :skip_expires =^> true}^) echo.# Using default node name ^(fqdn^) - echo.log_level :auto + echo.log_level :info echo.log_location STDOUT EXPECTED expect(bootstrap_context.config_content).to eq expected |