[chef] Re: Re: accessing environment attributes in cookbooks


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: accessing environment attributes in cookbooks
  • Date: Wed, 26 Dec 2012 08:07:35 -0800


On Wednesday, December 26, 2012 at 8:00 AM, Mike wrote:

Hi Steven,

You've placed your debugging code in the attributes/default.rb file,
this gets evaluated at compile time.

Have you tried placing the same debugging code in the
recipes/default.rb (or somewhere like that) where the debugging
statement will show what the value of an attribute is at the execution
phase?

-Mike
A slightly longer explanation:

Attributes from roles and environments are not applied to the node until after attributes files have all been evaluated. In Chef 11, this has been changed and you will be able to use role/environment attributes in attributes files.


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§