[chef] Re: Re: Re: chef recipe does not fail on bash resource


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Re: chef recipe does not fail on bash resource
  • Date: Mon, 30 Sep 2013 14:41:04 -0700


On Monday, September 30, 2013 at 2:35 PM, Manoj Thakkar wrote:

Thanks Andy,

It helped, The tricky part is if the bash script fails the cookbook file attribute will not run in next time since the file is the same so the bash resource will not run also.

How do i make bash script run if it failed last time ? is there a feature ? or may be i shall throw a file output check the status is that file and rerun bash script no matter what.
Your best bet is to use some knowledge about what the script actually does to guard against it running when not needed, and code this into a `not_if`, `only_if` or `creates` parameter on the bash resource itself. See: http://docs.opscode.com/resource_common.html
 

Thanks
Manoj



-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§