- From: Bryan Berry <
>
- To:
- Subject: [chef] Re: Bash script block troubleshooting
- Date: Tue, 20 Dec 2011 01:15:41 +0100
mike,
add the following to your bash block, it will help u in your debugging
flags '-x'
this puts bash in debug mode and prints out each line after all
variables have been substituted and globs expanded
On Tue, Dec 20, 2011 at 1:10 AM, Michael Glenney
<
>
wrote:
>
When chef runs a bash block it creates a "script" in the /tmp folder and
>
then runs it. It deletes this file when it's done. Is there any way to
>
tell chef to leave it there. I have a bash block that's failing. It runs
>
fine when I run it but comes back with a return code of "2" when chef runs
>
it and it causes everything to bomb out. I'd like to look at what it's
>
running so I can a) make sure my variables are being populated properly and
>
b) run it, see the output and troubleshoot.
>
>
Thanks,
>
>
Mike G.
Archive powered by MHonArc 2.6.16.