On 28/06/2012, at 21:24, kalaniS <ksamarawickr...@gmail.com> wrote:
> I'm a newbie to puppet and have been trying to execute a shell script > residing in puppet master machine in a puppet agent, with no luck so > far. Would appreciate any ideas on how to do this. > It does depend on what you mean, can you clarify further? If you have a script on your master, say /tmp/coolscript.sh and during a puppet run you want the client to call out to the master and execute coolscript.sh then no. Puppet won't do that. Maybe here is a good place to start: http://docs.puppetlabs.com/learning/agent_master_basic.html You can set up file and exec resources to first pull the script to the client and then run it. Something like: file {'/tmp/coolscript.sh': source => 'puppet:///<path> } exec {'exec_coolness': command => '/tmp/coolscript.sh', require => File[''/tmp/coolscript.sh'] } You can also perform different commands on the master during compile time for the client manifest. I'll leave you to your own investigations on that. http://docs.puppetlabs.com/references/stable/function.html#generate Cheers, Den -- 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.