summaryrefslogtreecommitdiff
path: root/lib/chef/knife.rb
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2016-02-03 08:53:02 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2016-02-03 08:53:02 -0800
commit09227432c7a8afeac633023abbeec2e9c14cbd1b (patch)
tree811fc939d4ccdaf66b0bf6bf7cdef10bb0172191 /lib/chef/knife.rb
parentab63cd4be967b5d01f6ec856244e4b9af4e896d9 (diff)
parentd1f9d3fe01da4620c983ee9b74cbd973abbff418 (diff)
downloadchef-09227432c7a8afeac633023abbeec2e9c14cbd1b.tar.gz
Merge pull request #4481 from chef/jdm/fips-58
Allow use of command line fips switch for knife
Diffstat (limited to 'lib/chef/knife.rb')
-rw-r--r--lib/chef/knife.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb
index bd34981008..56a23e0dde 100644
--- a/lib/chef/knife.rb
+++ b/lib/chef/knife.rb
@@ -398,7 +398,6 @@ class Chef
merge_configs
apply_computed_config
Chef::Config.export_proxies
- Chef::Config.init_openssl
# This has to be after apply_computed_config so that Mixlib::Log is configured
Chef::Log.info("Using configuration from #{config[:config_file]}") if config[:config_file]
end
@@ -412,6 +411,7 @@ class Chef
ui.error "You need to add a #run method to your knife command before you can use it"
end
enforce_path_sanity
+ maybe_setup_fips
Chef::LocalMode.with_server_connectivity do
run
end
@@ -570,5 +570,11 @@ class Chef
Chef::Config[:chef_server_url]
end
+ def maybe_setup_fips
+ if !config[:fips].nil?
+ Chef::Config[:fips] = config[:fips]
+ end
+ Chef::Config.init_openssl
+ end
end
end