[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: Thu, 6 Dec 2012 07:56:56 +0530

There are few resources which no matter what, will always say that it would be updated, for example, if I had a huge runlist with one of it having a recipe that uses remote_directory and I run them in whyrun mode immediately after a normal client run, the whyrun output would say "1 resource would be updated".  However in my case I don't care about whether remote directory runs or not I only care about my recipes so I would expect an output that says 0 resources would have been updated. Hence the need to ignore them at whyrun.
.
Thanks
Kishore

On Dec 5, 2012 10:20 PM, "Daniel DeLeo" < "> > wrote:

On Wednesday, December 5, 2012 at 8:25 AM, Kishore S Kumar wrote:

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]'

You'd need to use the block form:

  not_if { Chef::Config[:why_run] }

Just a quick question, what is it about this recipe that makes you want to avoid it in why run mode?


-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§