diff options
author | Michael Scherer <misc@mageia.org> | 2012-01-15 16:24:54 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-01-15 16:24:54 +0000 |
commit | 748800009bde2a71d934e65f68699847a5fc8017 (patch) | |
tree | b5d825b53862a49e38892412b62841369c419ea9 /deployment/repositories | |
parent | 6634f9507e94fa94f8c959ce674eeecda463f852 (diff) | |
download | puppet-748800009bde2a71d934e65f68699847a5fc8017.tar puppet-748800009bde2a71d934e65f68699847a5fc8017.tar.gz puppet-748800009bde2a71d934e65f68699847a5fc8017.tar.bz2 puppet-748800009bde2a71d934e65f68699847a5fc8017.tar.xz puppet-748800009bde2a71d934e65f68699847a5fc8017.zip |
make commit on admin repository automatically update the checkout
in /etc/puppet, so changes are applied faster
Diffstat (limited to 'deployment/repositories')
-rw-r--r-- | deployment/repositories/manifests/subversion.pp | 8 | ||||
-rw-r--r-- | deployment/repositories/templates/puppet_update.sh | 2 | ||||
-rw-r--r-- | deployment/repositories/templates/puppet_update.sudoers | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/deployment/repositories/manifests/subversion.pp b/deployment/repositories/manifests/subversion.pp index 8408d7dc..4a014f4f 100644 --- a/deployment/repositories/manifests/subversion.pp +++ b/deployment/repositories/manifests/subversion.pp @@ -12,6 +12,14 @@ class repositories::subversion { cia_module => "sysadm", } + sudo::sudoers_config { "puppet_update": + content => template("repositories/puppet_update.sudoers") + } + + subversion::hook::post_commit { "/svn/adm/|puppet_update": + content => template("repositories/puppet_update.sh") + } + subversion::repository { "/svn/soft/": group => "mga-packagers", commit_mail => ["soft-commits@ml.$domain"], diff --git a/deployment/repositories/templates/puppet_update.sh b/deployment/repositories/templates/puppet_update.sh new file mode 100644 index 00000000..059958a9 --- /dev/null +++ b/deployment/repositories/templates/puppet_update.sh @@ -0,0 +1,2 @@ +#!/bin/sh +sudo /usr/bin/svn update /etc/puppet diff --git a/deployment/repositories/templates/puppet_update.sudoers b/deployment/repositories/templates/puppet_update.sudoers new file mode 100644 index 00000000..0cc357b1 --- /dev/null +++ b/deployment/repositories/templates/puppet_update.sudoers @@ -0,0 +1 @@ +%mga-sysadmin ALL= NOPASSWD: /usr/bin/svn update /etc/puppet |