[chef] Re: Re: Arbitrary attributes for nodes


Chronological Thread 
  • From: Tristan Sloughter < >
  • To:
  • Subject: [chef] Re: Re: Arbitrary attributes for nodes
  • Date: Tue, 15 Feb 2011 09:11:35 -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:content-type; b=rwZVzWjHhVR/rtjzaaLs6h0Y8dfx4KktBDlPCX/d0FnUGYVl+9XEkYTNBC8zyS8by6 qhiXt0j0DWzlY0sEPVLWhGZzpLQLFC2hPqmJSXDts7QJwFgvNi9MPfXUaxVrlAgMpBsf Kuu2y6ZcyFJ+ZeqX05t+Uah0cLUlNT110hpdA=

But where is that done? I saw this in the training slides... I want it done per node with different values so I was hoping I could simply place it in the nodes attributes.

Tristan

On Tue, Feb 15, 2011 at 9:10 AM, Sean OMeara < "> > wrote:
node.set[:num] = 1

On Tue, Feb 15, 2011 at 10:03 AM, Tristan Sloughter
< "> > wrote:
> Maybe I'm missing something but the wiki pages on attributes and their use
> in roles, nodes and recipes is confusing me.
> I'd simply like to be able to set arbitrary attributes on a node that can be
> used in a recipe.
> Meaning somewhere in the node's json place something like, { "num" : "1" }
> And be able to access this in any recipe the node is running like
> node[:num].
> Is this not possible? I tried placing key/values under default through a
> knife edit of the node but my attempts to access the values in a recipe
> returns nil.
> Thanks,
> Tristan




Archive powered by MHonArc 2.6.16.

§