From f049ee75ff91cea6959ed0aa84fdb1e227e72076 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Thu, 22 Mar 2012 10:47:02 +0000 Subject: split mirror in a separate file --- modules/git/manifests/init.pp | 20 -------------------- modules/git/manifests/mirror.pp | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 modules/git/manifests/mirror.pp (limited to 'modules/git') 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 + } +} -- cgit v1.2.1