On Friday, March 7, 2014 2:13:47 PM UTC-6, Nick Miller wrote: > > Hi, > > 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. >
How does the latter follow from the former? > 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. > > No, that's not how Puppet works. Leaving aside for the moment the questions of initially cloning the repo to the master and of keeping it fresh (or not), you have two high-level alternatives: 1. The master puts appropriate resources in the target nodes' catalogs to direct them to fetch the needed files from it, or 2. The file transfer from master to agent is accomplished by a mechanism outside Puppet. This being a Puppet forum, I'll limit my comments to option (1), which nevertheless affords many possibilities. Among those are - Use an Exec to have the agents clone the repo *from the master's copy*(no Internet access required for this). - Declare a recursive File resource referring to the root of the cloned git repo, either - using a puppet:// URL (no extra setup required, but likely to perform poorly), or - referring to a network share exported by the master (requires the master to export a share, manage permissions, etc). - Pack up the repo into a ZIP file; use a File resource to make the target nodes have a copy of the ZIP, and an Exec to have them unpack it when needed (well performing, relatively easy to recognize changes, but requires that the target nodes retain their copier of the ZIP). - Pack up the repo into a Windows installer, and manage it on the target nodes as a Package resource. No doubt there are other alternatives. Personally I'd go with git-cloning from the master. 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/58c5c6e6-7efb-4574-8e5f-4afa676f287d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.