- From: Lamont Granquist <
>
- To: Greg Barker <
>
- Cc: "
" <
>
- Subject: [chef] Re: Re: Re: Re: Re: Re: How to override node attribute with lazy value?
- Date: Thu, 09 Oct 2014 20:39:06 -0700
"setting the automatic_attrs" wasn't really the point of that code
I pasted there. the point is to execute it at compile time rather
than converge time. the code you point to in the system cookbook
is inside of a provider and will also get executed at converge
time. you can call the system_hostname LWRP yourself and force it
to run at compile time by method chaining .run_action(:set) off of
it (and add an `action :nothing` attribute inside the LWRP).
On 10/9/14, 8:13 PM, Greg Barker wrote:
"
type="cite">
Thanks Lamont. I tried using the system
cookbook which seems to do as you have suggested ( setting
the automatic_attrs) but it still doesn't work.
The system cookbook is first in my run list and then towards
the end it gets to my recipe which contains:
node.override["chef-server"]["configuration"]["nginx"]["ssl_certificate"]
= "/etc/pki/tls/certs/#{node['fqdn']}.pem"
...but it still thinks node['fqdn'] is localhost, it doesn't
get the updated value.
I guess I will just have to steer clear of relying on
node['fqdn'] unless you have any other ideas, it's a bummer
that so many cookbooks use it though.
Greg
|
- [chef] Re: Re: How to override node attribute with lazy value?, (continued)
- [chef] Re: Re: How to override node attribute with lazy value?, Greg Barker, 10/02/2014
- [chef] Re: Re: Re: How to override node attribute with lazy value?, Christine Draper, 10/03/2014
- [chef] Re: Re: Re: Re: How to override node attribute with lazy value?, Lamont Granquist, 10/03/2014
- [chef] Re: Re: Re: Re: Re: How to override node attribute with lazy value?, Greg Barker, 10/03/2014
- [chef] Re: Re: Re: Re: Re: Re: How to override node attribute with lazy value?, Lamont Granquist, 10/03/2014
- [chef] Re: Re: Re: Re: Re: Re: How to override node attribute with lazy value?, Lamont Granquist, 10/04/2014
- [chef] Re: Re: Re: Re: Re: Re: How to override node attribute with lazy value?, Greg Barker, 10/09/2014
- [chef] Re: Re: Re: Re: Re: Re: How to override node attribute with lazy value?, Lamont Granquist, 10/09/2014
- [chef] Re: How to override node attribute with lazy value?, Mathieu Martin, 10/11/2014
- [chef] Re: Re: How to override node attribute with lazy value?, Tensibai Zhaoying, 10/11/2014
- [chef] Re: Re: Re: How to override node attribute with lazy value?, dwdyke, 10/11/2014
- [chef] Re: Re: How to override node attribute with lazy value?, dwdyke, 10/11/2014
- [chef] Re: Re: How to override node attribute with lazy value?, Lamont Granquist, 10/12/2014
Archive powered by MHonArc 2.6.16.