[chef] Re: Re: Using libraries in attributes file to fetch values from a service.


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Using libraries in attributes file to fetch values from a service.
  • Date: Mon, 25 Aug 2014 08:24:41 -0700



On Monday, August 25, 2014 at 8:18 AM, Steffen Gebert wrote:

> Hi,
>  
> isn't this what I've been asking for here?
> http://stackoverflow.com/questions/22844080/chef-use-library-function-in-attributes
>  
> If yes, then my experience is that this isn't working.
>  
> Yours
> Steffen

Attribute files are eval’d in the context of the `Chef::Node` object, not 
`Chef::Node::Attribute`. In any case, when you include your helper, your code 
is basically the same as `node.node[“gerrit”][“version”]`, which is why you 
get the NoMethodError.

--  
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§