- From: Phil Dibowitz <
>
- To:
- Subject: [chef] Re: Chef 11 Attribute Changes -- Computed Attributes Edition
- Date: Tue, 6 Nov 2012 18:07:07 -0800
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
Attachment:
signature.asc
Description: Digital signature
Archive powered by MHonArc 2.6.16.