When I create attributes in my cookbook's attributes /attributes/default.rb things work fine.
If I add a recipe to my cookbook, say /recipes/dofubar.rb, I expect that attributes defined in /attributes/dofubar.rb to be loaded. They do not appear to be.
Is there a way to define one set of default attributes for one recipe and other sets for other recipes?
There is no correlation between attribute file names and recipes. All files in the attributes/
folder are loaded in order during the start of the Chef Client run. Even if you name an attribute.rb file the same as a recipe, Chef makes no correlation. All attribute files will be loaded each time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With