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.
Operations Engineer, SaaS Operations
From: Vladimir Girnet <email@example.com:firstname.lastname@example.org>
Reply-To: "email@example.com:firstname.lastname@example.org" <email@example.com:firstname.lastname@example.org>
Date: Wednesday, December 19, 2012 12:35 AM
To: "email@example.com:firstname.lastname@example.org" <email@example.com:firstname.lastname@example.org>
Subject: [chef] Re: Explicit “default” or “common” environment?
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:
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?
Senior Infrastructure Engineer