diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2013-11-14 19:20:09 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2013-11-14 19:20:09 -0800 |
commit | dbd925b357b036447b47cf5f369792f81d69e76d (patch) | |
tree | 31a50b87878057b04b3e75bc1615cd67b228d74c /lib/chef/node.rb | |
parent | ecbc917ac5496f3138b798332ea66f477c33f8ba (diff) | |
download | chef-dbd925b357b036447b47cf5f369792f81d69e76d.tar.gz |
CHEF-4777: add include_recipes to recipes node attr
Diffstat (limited to 'lib/chef/node.rb')
-rw-r--r-- | lib/chef/node.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/node.rb b/lib/chef/node.rb index 007bd3c560..eaae1ee148 100644 --- a/lib/chef/node.rb +++ b/lib/chef/node.rb @@ -247,6 +247,12 @@ class Chef run_list.include?(recipe_name) || Array(self[:recipes]).include?(recipe_name) end + # used by include_recipe to add recipes to the expanded run_list to be + # saved back to the node and be searchable + def loaded_recipe(recipe_name) + automatic_attrs[:recipes] << recipe_name unless Array(self[:recipes]).include?(recipe_name) + end + # Returns true if this Node expects a given role, false if not. def role?(role_name) run_list.include?("role[#{role_name}]") |