summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-12-03 16:58:14 -0800
committertyler-ball <tyleraball@gmail.com>2014-12-08 14:57:26 -0800
commitdbdf7c41f4c20b0d7c3d3d8d0c72af9e2a8144b9 (patch)
treed7d0337fbf306dffe5ea906155e5c5bd9422377f /lib/chef
parentf6fee128f81acde3e1782ebb2533f14a56c2d0c0 (diff)
downloadchef-dbdf7c41f4c20b0d7c3d3d8d0c72af9e2a8144b9.tar.gz
if in why_run, do not enter the audit phase - because people run why_run to see converge statistics
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/client.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index 5d46794745..688bfa30c2 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -446,7 +446,10 @@ class Chef
converge_error = converge_and_save(run_context)
end
- if Chef::Config[:audit_mode] != :disabled
+ if Chef::Config[:why_run] == true
+ # why_run should probably be renamed to why_converge
+ Chef::Log.debug("Not running audits in 'why_run' mode - this mode is used to see potential converge changes")
+ elsif Chef::Config[:audit_mode] != :disabled
audit_error = run_audits(run_context)
end