From 568fecb14ed1e07f2de69c7e9636c1d20a734f61 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 19 Jul 2011 23:19:39 +0000 Subject: add a class to make a git mirror ( for gitweb ) --- modules/git/manifests/init.pp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'modules') diff --git a/modules/git/manifests/init.pp b/modules/git/manifests/init.pp index e1bc870e..6c0b1553 100644 --- a/modules/git/manifests/init.pp +++ b/modules/git/manifests/init.pp @@ -98,6 +98,20 @@ class git { } } + define mirror($source, + $refresh = '*/5') { + + exec { "/usr/bin/git clone $source $name": + alias => "git mirror $name", + creates => $name, + } + + cron { "update $name": + command => "/usr/bin/git pull $name" , + minute => $refresh + } + } + define svn_repository($source, $std_layout = true, $refresh = '*/5') { -- cgit v1.2.1