- From: Adam Jacob <
>
- To: "
" <
>
- Subject: [chef] Re: Re: Chef 11 Attribute Changes -- Computed Attributes Edition
- Date: Wed, 7 Nov 2012 22:50:24 +0000
- Accept-language: en-US
You still have a higher precedence option here - it's just precedence,
instead of merge order.
Adam
On 11/6/12 6:07 PM, "Phil Dibowitz"
<
>
wrote:
>
On Mon, Nov 05, 2012 at 04:07:29PM -0800, Daniel DeLeo wrote:
>
> ### Attributes Files and Recipes Have the Same Precedence
>
>
>
> In Chef 10.x and previous, setting a default attribute value in a recipe
>
> would overwrite a value set by a role or environment. In Chef 11, values
>
> set from a cookbook are stored separately, so the value set by the role
>
> or environment will not be overwritten.
>
>
>
> Consider a role like this:
>
>
>
> default_attributes "app_name" => "from-role"
>
>
>
> And a recipe file like this:
>
>
>
> node.default["app_name"] = "from-recipe"
>
>
>
> In Chef 10.x and lower, the value of `node["app_name"]` will be
>
> "from-recipe". In Chef 11, the value will be "from-role"
>
>
Wait, this is really bad. It's one thing to store them separately, but
>
you're
>
1. changing predecence and 2. giving no way to override roles.
>
>
Since roles are non-static, that's REALLY bad. roles are upload-time
>
static
>
data. The thing that can do dynmaic logic later on should absolutely have
>
a
>
higher precedence. At read-time this should collapse the way it does now,
>
and
>
I should get the recipe value.
>
>
--
>
Phil Dibowitz
>
>
Open Source software and tech docs Insanity Palace of Metallica
>
http://www.phildev.net/ http://www.ipom.com/
>
>
"Be who you are and say what you feel, because those who mind don't matter
>
and those who matter don't mind."
>
- Dr. Seuss
>
- [chef] Re: Chef 11 Attribute Changes -- Computed Attributes Edition, (continued)
Archive powered by MHonArc 2.6.16.