[chef] Re: Exposing attributes from cookbooks you depend on


Chronological Thread 
  • From: Lamont Granquist < >
  • To: "Hajducko, Steven" < >
  • Cc: " " < >
  • Subject: [chef] Re: Exposing attributes from cookbooks you depend on
  • Date: Thu, 19 Mar 2015 15:07:12 -0700

On 3/19/15 1:53 PM, Hajducko, Steven wrote:
" type="cite">
Provserv is a wrapper ( and the name is made up ) - it does its own things as well, so it's probably best to call it an application cookbook that's depending on another application cookbook.  It's also business specific to us.  The cobbler cookbook is meant to, in the end, be shared with the community.

The cobbler attributes that need to be set however, need to be set per environment.  We'll have several of the 'provserv' applications running, each in its own environment.

My question was about whether people generally re-namespace these attributes when you have a cookbook you're depending on and you need to expose those configurable attributes to the user.

In our case, we'd be setting all these in a Chef environment.  But, do I expose them as:

default["provserv"]["dhcp"]["gateway"] = 1.1.1.1

and in the recipe:

node["cobbler"]["dhcp"]["gateway"] = node["provserv"]["dhcp"]["gateway"]


yeah, don't set that attribute in the recipe.

you probably set it in the recipe because you hit the interpolated attributes problem in the attributes file.

its better to just use default["cobbler"]["dhcp"]["gateway"] in the attributes file of the proserv cookbook.





Archive powered by MHonArc 2.6.16.

§