[chef] Re: Re: Re: Re: Re: Re: Re: Re: One-Shot runlists with inheritance


Chronological Thread 
  • From: Matt Ray < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: One-Shot runlists with inheritance
  • Date: Tue, 1 Feb 2011 17:21:49 -0600

The attribute only adds a recipe to include, you could modify it to
handle an array if you really wanted.
https://github.com/mattray/cookbooks/blob/master/one-shot/recipes/default.rb#L23

If you really want a substantial one-shot run_list, you could modify
the cookbook to remove a role instead, and include the modified
one-shot cookbook in your role to be removed.
https://github.com/mattray/cookbooks/blob/master/one-shot/recipes/default.rb#L28

Thanks,
Matt Ray
Technical Evangelist | Opscode, Inc
E: 

 T: (512) 731-2218
Twitter, Github: mattray



On Tue, Feb 1, 2011 at 4:03 PM, Dan Nemec 
< >
 wrote:
> Matt,
> That's a great idea. I looked it over and I think it does solve the problem
> I'm thinking of with a one-shot runlist.
> I'm relatively new to Chef so I don't know everything that is possible and
> have a few questions.
> 1) Your attribute that contains a list of recipes, can it contain roles with
> runlists as well?
> I'm still left with the problem that I require a "base" runlist as well. The
> way I see your one-shot runlist is that if I want to use it with
> "chef-client -j" then I still need to include all of the roles and recipes I
> consider "base" in the list of the -j option. Your solution just provides me
> the mechanism to attach some recipes (maybe roles) to an existing runlist
> where it will be removed after the run. That is exactly what I need for the
> second half of my problem.
> [I'll interject here that one of my design goals is that I have
> environment-specific configuration in as few places as possible. Commands,
> especially, cannot be environment dependent. I just want to run "doit" not
> "doit.prod".



Archive powered by MHonArc 2.6.16.

§