[chef] Re: Re: Re: Re: ordering the roles directory into subdirectories


Chronological Thread 
  • From: Bryan McLellan < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: ordering the roles directory into subdirectories
  • Date: Sat, 30 Oct 2010 07:43:07 -0700

It's currently common to apply two roles to each node; one for the type and one for the environment. Inside the role for the job you can nest other roles to clarify configuration.

You could have a file structure like:

roles/
roles/type/type_monitoring.rb
roles/environment/environment_prod.rb
roles/server/server_nagios.rb

Name the roles the same as the filename that contains them. When you upload them using knife from file specify the relative path. Then when using knife you use other tools like grep to filter the output.

knife role list | grep environment

btm

On Oct 29, 2010 7:15 PM, "Christian Requena" < " target="_blank"> > wrote:

yes, but  how do you tell chef to use the roles in the subdirectories?

On 10/29/2010 11:26 PM, Jesse Nelson wrote: > > you can prefix the roles and toss em in subdirs f...




Archive powered by MHonArc 2.6.16.

§