diff options
author | Michael Scherer <misc@mageia.org> | 2012-03-22 10:47:02 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2012-03-22 10:47:02 +0000 |
commit | f049ee75ff91cea6959ed0aa84fdb1e227e72076 (patch) | |
tree | 5e31dc925a7ecd1d052307b401dd77a178411af8 /modules/git | |
parent | a14271cffaf243394d60d8eb21fea1f1af61b901 (diff) | |
download | puppet-f049ee75ff91cea6959ed0aa84fdb1e227e72076.tar puppet-f049ee75ff91cea6959ed0aa84fdb1e227e72076.tar.gz puppet-f049ee75ff91cea6959ed0aa84fdb1e227e72076.tar.bz2 puppet-f049ee75ff91cea6959ed0aa84fdb1e227e72076.tar.xz puppet-f049ee75ff91cea6959ed0aa84fdb1e227e72076.zip |
split mirror in a separate file
Diffstat (limited to 'modules/git')
-rw-r--r-- | modules/git/manifests/init.pp | 20 | ||||
-rw-r--r-- | modules/git/manifests/mirror.pp | 19 |
2 files changed, 19 insertions, 20 deletions
diff --git a/modules/git/manifests/init.pp b/modules/git/manifests/init.pp index 50aa8d72..32d1060b 100644 --- a/modules/git/manifests/init.pp +++ b/modules/git/manifests/init.pp @@ -1,24 +1,4 @@ class git { - define mirror($source, - $description, - $refresh = '*/5') { - - exec { "/usr/bin/git clone --bare $source $name": - alias => "git mirror $name", - creates => $name, - before => File["$name/description"], - } - - file { "$name/description": - content => $description, - } - - cron { "update $name": - command => "cd $name ; /usr/bin/git fetch -q", - minute => $refresh - } - } - define svn_repository($source, $std_layout = true, $refresh = '*/5') { diff --git a/modules/git/manifests/mirror.pp b/modules/git/manifests/mirror.pp new file mode 100644 index 00000000..1700380a --- /dev/null +++ b/modules/git/manifests/mirror.pp @@ -0,0 +1,19 @@ +define git::mirror( $source, + $description, + $refresh = '*/5') { + + exec { "/usr/bin/git clone --bare $source $name": + alias => "git mirror $name", + creates => $name, + before => File["$name/description"], + } + + file { "$name/description": + content => $description, + } + + cron { "update $name": + command => "cd $name ; /usr/bin/git fetch -q", + minute => $refresh + } +} |