- From: Jeff Blaine <
>
- To:
- Subject: [chef] Re: all attributes files get evaluated?
- Date: Thu, 31 Oct 2013 15:33:03 -0400
On 10/31/2013 2:27 PM, Johnny Tan wrote:
>
Are _all_ attribute files evaluated for all nodes in the same cookbook?
>
(Assuming no conditionals that would exclude.)
Yes.
>
For some reason, we thought we could have different "role recipes" that
>
included different attribute files, rather than setting the attributes
I made this assumption too. I had an attributes/foo.rb that I
thought would only be used for recipes/foo.rb. I was wrong :)
>
inside the recipe. But it wasn't working, and this page seems to confirm
>
that all attribute files would be evaluated even if you're not
>
intentionally "including" them:
>
http://docs.opscode.com/essentials_cookbook_attribute_files.html
>
>
If that's the case, what's the best practice here? To _only_ put default
>
values in any attributes file, and then set role differences inside role
>
recipes? (We're starting to move to role recipes, but we might have
>
several roles within the same cookbook, so we were hoping to set each
>
role's attributes with a different attributes file.)
Looking forward to others' info here as well.
Archive powered by MHonArc 2.6.16.