[chef] Re: Re: Environment Inheritence


Chronological Thread 
  • From: Douglas Garstang < >
  • To:
  • Cc: " " < >
  • Subject: [chef] Re: Re: Environment Inheritence
  • Date: Thu, 18 Jun 2015 10:57:47 -0700

Nathan,

I'm making heavy use of community cookbooks. As such there isn't a cookbook I can place attributes in, in most cases. Unless, I start wrapping just to set attributes in a cookbook, which doesn't make sense to me.

Douglas.

On Thu, Jun 18, 2015 at 10:52 AM, Nathen Harvey < " target="_blank"> > wrote:
A node can only have one environment.  I'm not sure you'd be able to create a 'base' environment or, even if you could, if it would be recommended.

I'd recommend setting good defaults in your cookbooks and then overriding those using attributes in environments.

On Thu, Jun 18, 2015 at 1:48 PM, Douglas Garstang < " target="_blank"> > wrote:
All,

I'm making pretty heavy use of environments. There's quite a fair bit of duplication and I'd like to implement a 'base' environment, with common attributes that apply to all environments. How would I do this?

What happens if the same attribute is defined in multiple environments? Are they merged together or does the 'inherited' one override the 'base' one?

Thanks,
Doug






--



Archive powered by MHonArc 2.6.16.

§