[chef] Re: Re: environment override attrs doesn't take precedence over node attributes


Chronological Thread 
  • From: Sachin Sagar Rai < >
  • To:
  • Subject: [chef] Re: Re: environment override attrs doesn't take precedence over node attributes
  • Date: Mon, 19 Mar 2012 23:11:07 +0545

@Matt, thanks.
So stupid of me that I didn't see that.

-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow

On Monday, March 19, 2012 at 10:31 PM, Matthew Moretti wrote:

I don't know if this is just a typo, but you show your override attribute as [apache2][listen_ports] and the default attribute is [apache][listen_ports] without the "2".

-Matt Moretti

On Mon, Mar 19, 2012 at 12:02 PM, Sachin Sagar Rai < "> > wrote:
THe following is my environments/production.rb file

    name "production"
    description "The production environment"
    override_attributes "apache2" => { "listen_ports" => [ "80", "443" ] }

And in the recipe cookbooks/application/recipes/mod_php_apache2.rb, there is

    node.default['apache']['listen_ports'] = [ "8080" ] at line 22
    
In the wiki http://wiki.opscode.com/display/chef/Attributes, it says that the `environment override_attributes` will take the precedence over the node attributes. But in my every chef run, the port gets set to 8080 in the file `/etc/apache2/ports.conf`

Why is this?

-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow






Archive powered by MHonArc 2.6.16.

§