Re: [Puppet Users] Puppet in a bash script

2011-12-06 Thread Felix Frank
Caution: puppet agent --test will return non-zero exit code if any resources needed changing. If in doubt, prefer puppet agent --one-time --no-daemonize (typos notwithstanding). On 11/14/2011 01:01 PM, John Kennedy wrote: > puppet agent --test > ANSW=$? Otherwise, I'm stumped, this shouldn't hap

Re: [Puppet Users] Puppet in a bash script

2011-11-20 Thread Stefan Schulte
On Sat, Nov 19, 2011 at 08:25:18AM -0800, Harish Agarwal wrote: > I did the echo above and didn't get any output It's as if this command > is never encountered. If there are errors thrown during the puppet run, > will it throw an error and prevent the next command from executing? If the sh

Re: [Puppet Users] Puppet in a bash script

2011-11-19 Thread Mohamed Lrhazi
Try adding -x to the bash (first line) to output each command as they are run... What if you removed everything in the script but the shutdown command.. does it work? Mohamed. On Sat, Nov 19, 2011 at 11:25 AM, Harish Agarwal wrote: > I did the echo above and didn't get any output  It's as

Re: [Puppet Users] Puppet in a bash script

2011-11-19 Thread Harish Agarwal
I did the echo above and didn't get any output It's as if this command is never encountered. If there are errors thrown during the puppet run, will it throw an error and prevent the next command from executing? BTW, I do have the full path of the binaries in my shell script now. -- You r

Re: [Puppet Users] Puppet in a bash script

2011-11-14 Thread John Kennedy
On Fri, Nov 11, 2011 at 18:40, Harish Agarwal wrote: > Hello, > > I'm using puppet via a bash script when I spin up a machine to configure > it. I'd like to restart the instance after puppet's run is complete. In > my bash script I have: > > puppet agent --test > shutdown -r now > > > Puppet ru

[Puppet Users] Puppet in a bash script

2011-11-13 Thread Harish Agarwal
Hello, I'm using puppet via a bash script when I spin up a machine to configure it. I'd like to restart the instance after puppet's run is complete. In my bash script I have: puppet agent --test shutdown -r now Puppet runs to completion, but "shutdown -r now" never executes. I'm not sure