[chef] Re: Re: Re: Re: Re: A question about override_attributes


Chronological Thread 
  • From: JJ Asghar < >
  • To: " " < >
  • Subject: [chef] Re: Re: Re: Re: Re: A question about override_attributes
  • Date: Tue, 28 May 2013 16:05:20 +0000
  • Accept-language: en-US

Perfect thanks!


Best Regards,
JJ Asghar
e: | c: 512.619.0722 | o: 512.977.5876



Very good point - normally you don't want to edit the node and override via there, much better via a recipe.

But if you did - it would look something like this (from the link you posted).



On Tue, May 28, 2013 at 11:54 AM, Daniel DeLeo < " target="_blank"> > wrote:

On Tuesday, May 28, 2013 at 8:48 AM, JJ Asghar wrote:

It looks like this can work:
(snip) 

I believe when you edit a node you want to set the precedence to be "normal" level attribute which is above the default attribute level.

I don't believe override attributes can be edited in the node data.  
This is correct, you cannot meaningfully edit override attributes per-node. Default and override attributes are designed to belong to cookbooks/roles/environments, so they are cleared by chef-client at the beginning of each chef-client run. This ensures that attributes you've removed from cookbooks/roles/environments are also deleted from clients.

Generally, it's better to define attributes on roles (or "role cookbooks" if you're into that) instead of munging the node data to make a snowflake node. This makes it clear why one particular node has a different behavior than others with the same cookbook(s).

-- 
Daniel DeLeo
 





Archive powered by MHonArc 2.6.16.

§