Run exec on agent [closed]

asked 2016-01-14 07:48:27 -0500

puppet_learner gravatar image

updated 2016-01-14 07:53:46 -0500


I have set up master-agent architecture for puppet. I am basically trying to install & configure some packages on agent. For that I need to run some scripts & programs which are stored on server in the files directory of respective modules. I am using exec resource to run those script & programs with absolute modulepath. But when I run test on agent exec fails due to scripts in-availability.

I am not much aware of master-agent architecture. So how can I tell agent to fetch those scripts & programs which are stored on master in files directory of those modules & run it. Is this approach right or there is another elegant way to do it?

Following is a snippet of one of exec resources:

exec {

 command => 'easy_install /etc/puppet/modules/configure/files/',
 path    => ['/bin/','/sbin/','/usr/bin/','/usr/sbin/'],


Also how would the source parameter (for file() & template())behave for file resource in master-agent architecture? Will I have to copy the files on agent or they will be fetched from master?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by puppet_learner
close date 2016-01-14 08:31:45.466280