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


Chronological Thread 
  • From: Andy Gale < >
  • To:
  • Subject: [chef] Re: chef recipe does not fail on bash resource
  • Date: Mon, 30 Sep 2013 21:09:57 +0100

On Mon, Sep 30, 2013 at 8:17 PM, Manoj Thakkar 
< >
 wrote:
> Hi All,
>
> I have written this chef recipe  below,
>
> This is what i expect/require
>
> * The bash resource shall fail is the shell script i am running below fails,
> * the cookbook file should not say up to date if the bash script below fail

The shell script always completes successfully because the last
command, echo, works. You probably want to put...

"set -e"

... at the beginning which will case bash to exit when it firsts
encounters an error.

-- 
Andy Gale
http://andy-gale.com
http://twitter.com/andygale



Archive powered by MHonArc 2.6.16.

§