diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-11-20 17:56:14 -0800 |
---|---|---|
committer | tyler-ball <tyleraball@gmail.com> | 2014-12-17 18:52:03 -0800 |
commit | b6804bbe2e8fd90a958db3685da92b3112c29536 (patch) | |
tree | 7f8e6f7b34033377919f3a01fa14c300aee16e55 /lib/chef/application | |
parent | d223f2480cecb211a8c54edbb6ff4e7a46f9be9b (diff) | |
download | chef-b6804bbe2e8fd90a958db3685da92b3112c29536.tar.gz |
Instructions on running audit mode examples.
Diffstat (limited to 'lib/chef/application')
-rw-r--r-- | lib/chef/application/client.rb | 10 | ||||
-rw-r--r-- | lib/chef/application/solo.rb | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index 295dc2470e..b10f818cf4 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -241,7 +241,15 @@ class Chef::Application::Client < Chef::Application option :audit_mode, :long => "--[no-]audit-mode", :description => "If not specified, run converge and audit phase. If true, run only audit phase. If false, run only converge phase.", - :boolean => true + :boolean => true, + :proc => lambda { |set| + # Convert boolean to config options of :audit_only or :disabled + if set + :audit_only + else + :disabled + end + } IMMEDIATE_RUN_SIGNAL = "1".freeze diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb index 50f7f5c5d4..c3f5444ef7 100644 --- a/lib/chef/application/solo.rb +++ b/lib/chef/application/solo.rb @@ -212,8 +212,8 @@ class Chef::Application::Solo < Chef::Application @chef_client_json = config_fetcher.fetch_json end - # If we don't specify this, solo will try to perform the audits - Chef::Config[:audit_mode] = false + # Disable auditing for solo + Chef::Config[:audit_mode] = :disabled end def setup_application |