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


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

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.

§