summaryrefslogtreecommitdiff
path: root/lib/chef/application/client.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-09-21 15:04:09 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-03-11 12:20:20 -0700
commitdf23dbbda7d4eb621804f004ff85181d83a11641 (patch)
treedc4ac3d354e5b9eb3229ed9be56d5447cc9a1d85 /lib/chef/application/client.rb
parentb870d8c578a6424e405ec2083d5f47d331f09d14 (diff)
downloadchef-df23dbbda7d4eb621804f004ff85181d83a11641.tar.gz
WIP: Remove audit mode from chef-client
This just gives us a line count to the change and perhaps a starting point for when we do this in Chef 15 Signed-off-by: Tim Smith <tsmith@chef.io> Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/application/client.rb')
-rw-r--r--lib/chef/application/client.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb
index 0e5584ded3..cdeb376f96 100644
--- a/lib/chef/application/client.rb
+++ b/lib/chef/application/client.rb
@@ -272,11 +272,6 @@ class Chef::Application::Client < Chef::Application
boolean: true
end
- option :audit_mode,
- long: "--audit-mode MODE",
- description: "Enable audit-mode with `enabled`. Disable audit-mode with `disabled`. Skip converge and only perform audits with `audit-only`",
- proc: lambda { |mo| mo.tr("-", "_").to_sym }
-
option :minimal_ohai,
long: "--minimal-ohai",
description: "Only run the bare minimum ohai plugins chef needs to function",
@@ -374,13 +369,6 @@ class Chef::Application::Client < Chef::Application
config_fetcher = Chef::ConfigFetcher.new(Chef::Config[:json_attribs])
@chef_client_json = config_fetcher.fetch_json
end
-
- if mode = config[:audit_mode] || Chef::Config[:audit_mode]
- expected_modes = [:enabled, :disabled, :audit_only]
- unless expected_modes.include?(mode)
- Chef::Application.fatal!(unrecognized_audit_mode(mode))
- end
- end
end
def load_config_file
@@ -521,17 +509,6 @@ class Chef::Application::Client < Chef::Application
"\nEnable chef-client interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options."
end
- def audit_mode_settings_explanation
- "\n* To enable audit mode after converge, use command line option `--audit-mode enabled` or set `audit_mode :enabled` in your config file." +
- "\n* To disable audit mode, use command line option `--audit-mode disabled` or set `audit_mode :disabled` in your config file." +
- "\n* To only run audit mode, use command line option `--audit-mode audit-only` or set `audit_mode :audit_only` in your config file." +
- "\nAudit mode is disabled by default."
- end
-
- def unrecognized_audit_mode(mode)
- "Unrecognized setting #{mode} for audit mode." + audit_mode_settings_explanation
- end
-
def fetch_recipe_tarball(url, path)
Chef::Log.trace("Download recipes tarball from #{url} to #{path}")
if File.exist?(url)