On Monday, July 7, 2014 4:26:47 AM UTC-5, shashank sinha wrote:
>
> Hello,
>
> I am working on some project where I need to execute scp command on puppet 
> master to copy files from some external server to module/files/* each time 
> when puppet agent pull request received to master.I want something like to 
> copy a file and store it to puppet master /modules/files folder. 
>
> Is it possible to execute scp commands on puppet master 
> (password/password-less environment).
>
>

You can use the built-in generate() function to execute an arbitrary system 
command on the master during catalog compilation.  You can write a custom 
function to do the same.  You can run your command via Ruby code embedded 
in a template, via the template() or inline_template() function.

Having said that, what you are describing sounds like a bad idea to me.  If 
you want your Puppet clients to obtain files originating on some third 
server, then why not have them retrieve those files directly?  Doing so 
would spread the load better, and would minimize the risk of accidentally 
trashing your Puppet master by copy the wrong file into the wrong place.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4c175ecc-3204-4399-b765-940c5281c8ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to