diff options
author | danielsdeleo <dan@opscode.com> | 2014-02-03 15:54:50 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2014-02-03 17:00:48 -0800 |
commit | 196a36ed5e8d6a2c4ba8703d53ed0f6fd9e5922e (patch) | |
tree | f7fedd3b65675a110bf137267850241383cd8476 /lib/chef/policy_builder | |
parent | d472efe27b3c9cd77902002f4158969d5d9eda15 (diff) | |
download | chef-196a36ed5e8d6a2c4ba8703d53ed0f6fd9e5922e.tar.gz |
[CHEF-3506] suppress final node save when using override run list
Diffstat (limited to 'lib/chef/policy_builder')
-rw-r--r-- | lib/chef/policy_builder/expand_node_object.rb | 7 | ||||
-rw-r--r-- | lib/chef/policy_builder/policyfile.rb | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/chef/policy_builder/expand_node_object.rb b/lib/chef/policy_builder/expand_node_object.rb index dbb11380c8..38b8b7551b 100644 --- a/lib/chef/policy_builder/expand_node_object.rb +++ b/lib/chef/policy_builder/expand_node_object.rb @@ -186,6 +186,13 @@ class Chef cookbook_hash end + # Indicates whether the policy is temporary, which means an + # override_runlist was provided. Chef::Client uses this to decide whether + # to do the final node save at the end of the run or not. + def temporary_policy? + !!@original_runlist + end + ######################################## # Internal public API ######################################## diff --git a/lib/chef/policy_builder/policyfile.rb b/lib/chef/policy_builder/policyfile.rb index e9041d5c0f..19b9aaf542 100644 --- a/lib/chef/policy_builder/policyfile.rb +++ b/lib/chef/policy_builder/policyfile.rb @@ -186,6 +186,12 @@ class Chef cookbooks_to_sync end + # Whether or not this is a temporary policy. Since PolicyBuilder doesn't + # support override_runlist, this is always false. + def temporary_policy? + false + end + ## Internal Public API ## def run_list_with_versions_for_display |