On 07.03.2014 21:13, Nick Miller wrote:
I'm just starting out with puppet, and I have a basic handle on it. What I've been tasked to do is to be able to push files from a git repo to Windows servers. The servers themselves will have no internet access, so installing cygwin & git on the agents is not an option. What I'd like to do is create a manifest that clones the repo locally, then copies that directory to the Windows client. I have vscrepo working, I just need to know how to pull the repo, save the files to the puppet master server, then copy that directory to the agent when it connects.
Depending on your requirements to fidelity and coding skill, the tow options coming two my mind are cronjob on the master or puppet function.
The cronjob on the master (or an equivalent vcsrepo resource in its configuration) would take care that the repo is (relatively) up-to-date. The agent would only recursively copy the result down to the nodes. Upside: very easy to do. Downside: git repo might not be up-to-date, race conditions while updating.
The puppet function could do the cloning in a temporary directory and put all required files as finished resources into the catalog (ala create_resource). That will bloat the catalog mightily but the clone will be fresh and consistent.
Regards, David -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/531B4384.1020008%40dasz.at. For more options, visit https://groups.google.com/d/optout.