I went ahead and went with the precendence ordering.I couldn't do the 'include_attribute' since the first script I ran need the X's attributes already, and it seemed like it would load Y's attributes as soon as it ran.The idea of roles are great, but I really like being able to git control my attributes file which I can't do natively with the roles.Thanks a lot for the suggestions though! I'll definitely keep them in mind as I work with Chef further.
Joaquin CasaresDataStaxSoftware Engineer/Support
On Thu, Aug 11, 2011 at 11:07 AM, andi abes < " target="_blank"> > wrote:If you're combined set of code involves mostly collating multiple recipes from different cookbooks, you can just create a role, and provide override attributes in it:given the precedence order (http://wiki.opscode.com/display/chef/Attributes#Attributes-Precedence) that might just do the trick.On Thu, Aug 11, 2011 at 12:01 PM, Daniel DeLeo < " target="_blank"> > wrote:If possible, you should structure your recipes and roles to avoid this situation entirely. If that's not an option, you can use `include_attribute` in an attributes file to force one attributes file to load before another.On Wednesday, August 10, 2011 at 6:15 PM, Joaquin Casares wrote:
> Hello,
> I have cookbook X that calls many functions off of cookbook Y. But my attributes for cookbook X are a superset of cookbook Y's attributes and of the values that intersect some are different in cookbook X.
> How would I go about doing this correctly?
> Right now I call include_recipe "Y::recipe1" from "X::default", but it seems to overwrite all my X configs that intersect.
> Should I just change cookbook X to use override instead of default settings?
> Thanks for the help!
> Joaquin
--
Dan DeLeo
Archive powered by MHonArc 2.6.16.