Say I have a cookbook bar. This cookbook depends on a cookbook foo. I have
included foo as a dependency in my metadata.rb and I’m doing an
include_recipe “foo” in bar’s default recipe. Groovy.
I need to override a few of foo’s default attributes in bar. So, in bar’s
attributes.rb, I override these attributes.
Now my question: ordinarily, I would include_attributes “foo” in bar before
I override these attributes, as alphabetically foo comes after bar, and I
want to ensure that those attributes are parsed before I override them.
That’s how I’ve been doing things. Today, though, I’m wondering if that’s
even necessary, because I have listed foo as a dependency in bar’s
metadata. Does Chef’s dependency resolver parse default attributes for all
dependencies before getting to a cookbook’s own attributes?
Hope that makes sense!