On May 19, 10:58 pm, Sumith Sudhakaran <sumit...@gmail.com> wrote: > Hi, > > After configuring puppet ( 2.6.8 ) in RHEL 5 update 6, I am able to > execute commands individually but I am not able execute the shell script, > its giving error only. Somebody please help me how can I execute a shell > script in rhel5 update6 using puppetserver. hereunder I am mentioning the > manifests format, which i have followed > > *exec { "start": > command => "/usr/bin/start.sh", > logoutput => true, > > }* > > Error I am getting:- > > err: /Stage[main]//Exec[start]/ > returns: change from notrun to 0 failed: /usr/bin/start returned 1 instead > of one of [0] at /etc/puppet/manifests/site.pp:7 > > *I am able to execute this script directly. *
And Puppet was able to execute it too (but see also below); that's how it found that the exit status was 1. Puppet expects scripts to follow the Unix convention of exiting with status 0 when they are successful. Any other exit status indicates a failure of some kind. When a command executed by a Puppet Exec exits with an error status, the Exec fails. I observe also, however, that the error message you report does not appear to exactly match your Exec resource: the error message claims to have run /usr/bin/start, whereas the exec gives the command as /usr/ bin/start.sh. These are not equivalent, so I'm not sure what's going on here. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.