[chef] Re: Re: Re: Re: Re: Re: command to run only part of run list one a node


Chronological Thread 
  • From: Manoj < >
  • To: " " < >
  • Cc: " " < >, Brad Knowles < >
  • Subject: [chef] Re: Re: Re: Re: Re: Re: command to run only part of run list one a node
  • Date: Thu, 5 Sep 2013 17:03:46 -0700

Thanks

The Reason is  all these roles use the same recipe and are overriding variables , is there a better way to do this ?

Sent from my iPhone

On Sep 5, 2013, at 4:39 PM, Daniel DeLeo < "> > wrote:

If you want, for just one run, to use a custom run_list, you can use the -o option to chef-client:

    -o RunlistItem,RunlistItem...,   Replace current run list with specified items
        --override-runlist

If this is more permanent, code whatever logic determines whether the given recipes need to run into a cookbook:

if should_run_this_recipe?
  include_recipe "some_cookbook::some_recipe"
end

Out of curiosity, what's your motivation? Are these recipes slow and you don't want to waste the time?

-- 
Daniel DeLeo

On Thursday, September 5, 2013 at 4:35 PM, Manoj wrote:

But both these roles will be added to the node and will be run when I run chef-client

Sent from my iPhone

On Sep 5, 2013, at 4:17 PM, Nikhil Shah < "> > wrote:

You can probably setup roles and add all 5 recipe on one role and have 3 recipes on the second role

Thanks,

Nikhil Shah


Thanks for the help ,

The idea is that I have 5
Recipes I wanted to run on one node but also want a way where I can run 3 out of these 5 if required and not run all 5 all the time

Thanks
Manoj

Sent from my iPhone

On Sep 5, 2013, at 3:34 PM, Brad Knowles < "> > wrote:

On Sep 5, 2013, at 5:23 PM, Manoj Thakkar < "> > wrote:

i have 5 recipes/cookbooks added as part of a node, i want to run only 3 ina given chef-client run . how do i do it ?

Set the run_list on the node to include the three cookbooks/recipes that you want to run. See <http://docs.opscode.com/essentials_node_object_run_lists.html> and <http://docs.opscode.com/knife_node.html#run-list-add>.

--
LinkedIn Profile: <http://tinyurl.com/y8kpxu>




Archive powered by MHonArc 2.6.16.

§