diff options
-rw-r--r-- | lib/chef/application/base.rb | 18 | ||||
-rw-r--r-- | lib/chef/application/client.rb | 20 | ||||
-rw-r--r-- | lib/chef/application/solo.rb | 2 |
3 files changed, 21 insertions, 19 deletions
diff --git a/lib/chef/application/base.rb b/lib/chef/application/base.rb index 057f747522..e0519367e0 100644 --- a/lib/chef/application/base.rb +++ b/lib/chef/application/base.rb @@ -215,6 +215,24 @@ class Chef::Application::Base < Chef::Application target } + option :disable_config, + long: "--disable-config", + description: "Refuse to load a config file and use defaults. This is for development and not a stable API.", + boolean: true + + if Chef::Platform.windows? + option :fatal_windows_admin_check, + short: "-A", + long: "--fatal-windows-admin-check", + description: "Fail the run when #{Chef::Dist::CLIENT} doesn't have administrator privileges on Windows.", + boolean: true + end + + option :fips, + long: "--[no-]fips", + description: "Enable FIPS mode.", + boolean: true + IMMEDIATE_RUN_SIGNAL = "1".freeze RECONFIGURE_SIGNAL = "H".freeze diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index 727fa27c7b..7e33777151 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -106,29 +106,11 @@ class Chef::Application::Client < Chef::Application::Base long: "--chef-zero-port PORT", description: "Port (or port range) to start #{Chef::Dist::ZERO} on. Port ranges like 1000,1010 or 8889-9999 will try all given ports until one works." - option :disable_config, - long: "--disable-config", - description: "Refuse to load a config file and use defaults. This is for development and not a stable API.", - boolean: true - - if Chef::Platform.windows? - option :fatal_windows_admin_check, - short: "-A", - long: "--fatal-windows-admin-check", - description: "Fail the run when #{Chef::Dist::CLIENT} doesn't have administrator privileges on Windows.", - boolean: true - end - option :listen, long: "--[no-]listen", - description: "Whether a local mode (-z) server binds to a port.", + description: "Wt dhether a local mode (-z) server binds to a port.", boolean: false - option :fips, - long: "--[no-]fips", - description: "Enable FIPS mode.", - boolean: true - option :skip_cookbook_sync, long: "--[no-]skip-cookbook-sync", description: "Use cached cookbooks without overwriting local differences from the #{Chef::Dist::SERVER_PRODUCT}.", diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb index 383e3b436f..1d3e817dfc 100644 --- a/lib/chef/application/solo.rb +++ b/lib/chef/application/solo.rb @@ -75,6 +75,8 @@ class Chef::Application::Solo < Chef::Application::Base set_specific_recipes + Chef::Config[:fips] = config[:fips] if config.key? :fips + Chef::Config[:solo] = true if !Chef::Config[:solo_legacy_mode] |