[chef-dev] Re: Exclude a recipe in whyrun mode


Chronological Thread 
  • From: Kishore S Kumar < >
  • To: Daniel DeLeo < >
  • Cc: chef-dev < >
  • Subject: [chef-dev] Re: Exclude a recipe in whyrun mode
  • Date: Wed, 5 Dec 2012 21:55:03 +0530

Override runlist does not work in my case as I'm trying automate it. However if I'm going to add config check for whyrun would it be possible to do it in my recipe something like 'not_if Chef::Config[why_run]'

On Dec 5, 2012 9:44 PM, "Daniel DeLeo" < "> > wrote:

On Wednesday, December 5, 2012 at 7:14 AM, Kishore S Kumar wrote:

Is there a way to exclude a recipe when in whyrun mode?

I mean when running a chef-client run in whyrun mode is there a way I could specify on the recipe to not consider it when in whyrun mode i.e. Nothing related to that recipe should be displayed in whyrun output.

Thanks,
Kishore

Your best bet is to use the `--override-runlist` option to chef-client.  Alternatively, you could add checks for `Chef::Config[:why_run]` to your recipe.

-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§