[chef] Re: Moving role attributes into cookbooks


Chronological Thread 
  • From: Tensibai < >
  • To:
  • Subject: [chef] Re: Moving role attributes into cookbooks
  • Date: Tue, 18 Mar 2014 14:05:58 +0100

Le 2014-03-17 18:54, Douglas Garstang a écrit :

Doing what I read to be a best practice, I just took a bunch of roles that defined set attributes for specific data centers, and moved them into cookbooks, one per location, ie:
 
bc-location-u1
bc-location.eu1
 
and so on. I just occurred to me that if I do this, then all cookbooks will need to depend (in the metadata.rb) file on ALL of these location based cookbooks.
 
is this correct? What am I missing?
 
Doug
 
 

I restart from original thread as I'll take another way than others answers.

Moving role to cookbok does not sound that complicated to me.

1) You 'role-cookbook' has the dependencies and include_recipe to redo the role-runlist

2) It has the atributes of your original role

3) This cookbook is in the node runlist (as the role is in fact)

 

With this path I can't find something different using a cookbook than a role for this purpose.

I think wishing to include this cookbook from others to avois specify them in the node runlist as you had do with a role is thinking bottom up, or perhaps better said: thinking too far about dependencies.

 

My 2 cents on the subject, I may be missing something somewhere :)

 

 

 



Archive powered by MHonArc 2.6.16.

§