Hi, On Thu, 2008-09-18 at 06:56 -0700, Leah wrote: > I am looking at storing all my configs in Git as that seems to be the > version control of choice here and it's time I learned it. I was > wondering what other people do to automatically update their puppet > server with the latest version from git. I was looking at using some > sort of git hook, but I'm not sure how to implement it efficiently and > securely with a shared repository on another server. I went looking > on the wiki, but could only find information about doing this with > subversion. > > Any examples of what others are doing would be appreciated so I can > figure out the best approach.
This is not a complete HOWTO, but I outlined what we're doing. Here we have a (group) shared git repository on a server (the puppetmaster in fact). The repository belongs to the group commiter. Each commiter has an ssh account and also belongs to the commiter group. Each commiter has sudo rights to call "/usr/local/bin/puppet-update" (see below). The git repository is created with shared mode (git init --shared=group). The git repository is bare. I cloned this repository in /etc/puppet has root. Then there is a post-update hook in the repository that does: exec sudo -u root /usr/local/bin/puppet-update With puppet-update doing basically: #!/bin/sh umask 002 ( cd /etc/puppet git pull --verbose) Hence, when we commit, and git push to the central repository, /etc/puppet is automatically updated. Hope that helps, -- Brice Figureau <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---