[chef] Re: Re: Re: Re: Re: Re: Arbitrary attributes for nodes


Chronological Thread 
  • From: Tristan Sloughter < >
  • To:
  • Cc:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Arbitrary attributes for nodes
  • Date: Tue, 15 Feb 2011 10:09:12 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=g70mTNCFPZDs3Ml6TDSvNzi1sYLQrA+qWAo7FJSY58xKDJpVtP2sKUQofQIdTdQ9fW 9V7YnP6qkeVmbPKzcK4zjMj2QSevmgAkbLeA29LGvPBA+nGSCE8sqBujnlNtEe6cvZW+ ZJoD/tsc/5HS1+CYWVL6mtR3sb7r0TBIw0oz4=

Great, thanks! This worked perfectly.

On Tue, Feb 15, 2011 at 10:05 AM, Daniel DeLeo < "> > wrote:

On Tuesday, February 15, 2011 at 7:47 AM, Tristan Sloughter wrote:

Hmm, so yes adding the default.rb to attributes works for the default values. But adding to override does not actual override. I'm still getting 0 (which I placed in default.rb instead of 1 which I placed in override). Could there be a reason that its not updating the information on the client when run?

Tristan
Nodes can't have their own persistent override attributes. However, "normal" level attributes will win over default level attributes, so you should use these to get the behavior you want.

The general pattern for attributes precedence is that cookbooks and roles should be setting defaults. If you need to change the values for a specific node, use, the normal attributes on the node. Overrides are there so roles can force a certain value even if the node already has a value there. There are certainly other ways to use it, but that is the pattern it was designed for.

-- 
Dan DeLeo





Archive powered by MHonArc 2.6.16.

§