diff options
author | Tim Smith <tsmith@chef.io> | 2018-03-12 10:13:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-12 10:13:57 -0700 |
commit | d4c052b0f7419ed7fbfd449f64488df8728e4a40 (patch) | |
tree | fa19c307a93343c0125ce5b0a393fef56f592d50 /lib/chef/resource | |
parent | 4e476cd823c0e10feb3a328cd843466454178920 (diff) | |
parent | 1cd5def13ff333fed55782f1543c805218a65d4a (diff) | |
download | chef-d4c052b0f7419ed7fbfd449f64488df8728e4a40.tar.gz |
Merge pull request #6962 from chef/windows_feature
Use node.override not node.normal in the windows_feature_dism resource
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/windows_feature_dism.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/resource/windows_feature_dism.rb b/lib/chef/resource/windows_feature_dism.rb index 00fc7f71ca..5bbcce4ab0 100644 --- a/lib/chef/resource/windows_feature_dism.rb +++ b/lib/chef/resource/windows_feature_dism.rb @@ -141,17 +141,17 @@ class Chef end # run dism.exe to get a list of all available features and their state - # and save that to the node at node.normal (same as ohai) level. + # and save that to the node at node.override level. # We do this because getting a list of features in dism takes at least a second # and this data will be persisted across multiple resource runs which gives us # a much faster run when no features actually need to be installed / removed. # @return [void] def reload_cached_dism_data Chef::Log.debug("Caching Windows features available via dism.exe.") - node.normal["dism_features_cache"] = Mash.new - node.normal["dism_features_cache"]["enabled"] = [] - node.normal["dism_features_cache"]["disabled"] = [] - node.normal["dism_features_cache"]["removed"] = [] + node.override["dism_features_cache"] = Mash.new + node.override["dism_features_cache"]["enabled"] = [] + node.override["dism_features_cache"]["disabled"] = [] + node.override["dism_features_cache"]["removed"] = [] # Grab raw feature information from dism command line raw_list_of_features = shell_out("dism.exe /Get-Features /Online /Format:Table /English").stdout @@ -178,7 +178,7 @@ class Chef # @return [void] def add_to_feature_mash(feature_type, feature_string) feature_details = feature_string.strip.split(/\s+[|]\s+/) - node.normal["dism_features_cache"][feature_type] << feature_details.first + node.override["dism_features_cache"][feature_type] << feature_details.first end # Fail if any of the packages are in a removed state |