diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-16 12:52:53 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-01-16 12:52:53 -0800 |
commit | 7c4670ce77cafb481477e9da75348a75b44c0393 (patch) | |
tree | 62a8d3a7ad3df821140911758d3743e98f62573f /lib/chef/node.rb | |
parent | dbd925b357b036447b47cf5f369792f81d69e76d (diff) | |
download | chef-7c4670ce77cafb481477e9da75348a75b44c0393.tar.gz |
CHEF-4777: fix for fully qualifying recipes
this makes it so that the recipes in the attribute will be fully
qualified, and will avoid the problem of both "cookbook" and
"cookbook::default" showing up.
Diffstat (limited to 'lib/chef/node.rb')
-rw-r--r-- | lib/chef/node.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/node.rb b/lib/chef/node.rb index eaae1ee148..69e5e05b01 100644 --- a/lib/chef/node.rb +++ b/lib/chef/node.rb @@ -249,8 +249,9 @@ class Chef # 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) + def loaded_recipe(cookbook, recipe) + fully_qualified_recipe = "#{cookbook}::#{recipe}" + automatic_attrs[:recipes] << fully_qualified_recipe unless Array(self[:recipes]).include?(fully_qualified_recipe) end # Returns true if this Node expects a given role, false if not. |