aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/manifests/init.pp
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-02-02 19:38:56 +0000
committerMichael Scherer <misc@mageia.org>2011-02-02 19:38:56 +0000
commit41684519aa964d08810b55337514f43ed2b4c537 (patch)
treefd7c9ee430430a56307cda89c98313e71d9084b1 /modules/git/manifests/init.pp
parent35bb51eec4c196252c6b12c9e9be34e89a7b1768 (diff)
downloadpuppet-41684519aa964d08810b55337514f43ed2b4c537.tar
puppet-41684519aa964d08810b55337514f43ed2b4c537.tar.gz
puppet-41684519aa964d08810b55337514f43ed2b4c537.tar.bz2
puppet-41684519aa964d08810b55337514f43ed2b4c537.tar.xz
puppet-41684519aa964d08810b55337514f43ed2b4c537.zip
- use a script, with a lock , so we can have more than one update
running without trouble. Remove older comments in manifests
Diffstat (limited to 'modules/git/manifests/init.pp')
-rw-r--r--modules/git/manifests/init.pp15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/git/manifests/init.pp b/modules/git/manifests/init.pp
index e32a9642..c4847c3b 100644
--- a/modules/git/manifests/init.pp
+++ b/modules/git/manifests/init.pp
@@ -84,14 +84,21 @@ class git {
alias => "git svn $name",
creates => $name,
}
- # TODO what if there is 2 concurents jobs ?
- # should we add a lock ( ie, a script + lock file for first sync )
+
+ file { "/usr/local/bin/update_git_svn.sh":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 755,
+ source => 'puppet:///modules/git/update_git_svn.sh',
+ }
+
cron { "update $name":
# done in 2 times, so fetch can fill the repo after init
- command => "cd $name && /usr/bin/git svn fetch && /usr/bin/git svn rebase" ,
+ command => "/usr/local/bin/update_git_svn.sh $name" ,
minute => $refresh
}
- # TODO find a way to prevent commit
+
file { "$name/.git/hooks/pre-receive":
ensure => present,
owner => root,