[chef] Re: Question about chef environments and attributes


Chronological Thread 
  • From: Joshua Miller < >
  • To:
  • Subject: [chef] Re: Question about chef environments and attributes
  • Date: Thu, 10 Oct 2013 20:40:04 -0700

Almost.  The syntax for setting attributes in environments is different than that of setting attributes in a cookbook.  

For example, your production environment would have:
default_attributes(
    "redis" => {
        "server" => "redis1.prod"
    }
)


On Thu, Oct 10, 2013 at 5:45 PM, Jenn Fountain < " target="_blank"> > wrote:
We have Production, Test and Development environments setup on our Chef Servers.  I would like to set attributes for each environment in attributes files like this:

default.rb contains   default[:redis][:server]='redis1'
Production.rb contains   default[:redis][:server]='redis1.prod'
Development contains   default[:redis][:server]='redis1.dev'
Test contains   default[:redis][:server]='redis1.test'

Am I understanding attributes correctly and this will work?

Thanks for any info!
Jenn





Archive powered by MHonArc 2.6.16.

§