On Tuesday, November 6, 2012 at 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 PrecedenceIn Chef 10.x and previous, setting a default attribute value in a recipewould overwrite a value set by a role or environment. In Chef 11, valuesset from a cookbook are stored separately, so the value set by the roleor 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're1. changing predecence and 2. giving no way to override roles.Since roles are non-static, that's REALLY bad. roles are upload-time staticdata. The thing that can do dynmaic logic later on should absolutely have ahigher precedence. At read-time this should collapse the way it does now, andI should get the recipe value.
--Phil Dibowitz ">Open Source software and tech docs Insanity Palace of Metallica"Be who you are and say what you feel, because those who mind don't matterand those who matter don't mind."- Dr. Seuss
Archive powered by MHonArc 2.6.16.