[chef] Re: Re: Explicit "default" or "common" environment?


Chronological Thread 
  • From: Tim Smith < >
  • To: " " < >
  • Subject: [chef] Re: Re: Explicit "default" or "common" environment?
  • Date: Wed, 19 Dec 2012 16:06:25 +0000
  • Accept-language: en-US

Roles would certainly work for this, but I'd love to see the concept for nested environments in the future or at least a super environment concept.

Tim Smith

Operations Engineer, SaaS Operations



Are the attributes values almost the same across all environments?

If yes - use roles for this. You can define common attributes in a "base" role, and ensure every node has it in run_list. And environments will have only environment-specific attributes. 

Also, if your data isn't changed much, you may use data bags. 


On Dec 19, 2012, at 10:28 AM, Torben Knerr wrote:

Hi Chefs,

I'm in the situation where my environment .rb files get larger, but 80% of the attributes are the same across all files.

This is quite a bit of code duplication, so I was wondering wheter there is something like an explicit "environments/_default.rb" whose run_list and attributes would get automatically merged with all other environments?

Is this a bad idea?

Cheers,
Torben


--
Vladimir Girnet
Senior Infrastructure Engineer
Tacit Knowledge
http://www.tacitknowledge.com




Archive powered by MHonArc 2.6.16.

§