From 29b4c8338ac752d88297a8383405d911ad0343c1 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 23 Mar 2014 16:19:35 +0000 Subject: Support git snapshots of a specific branch name (needed for identity.mageia.org) --- modules/git/manifests/snapshot.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/git/manifests') diff --git a/modules/git/manifests/snapshot.pp b/modules/git/manifests/snapshot.pp index 47ace403..940b50f0 100644 --- a/modules/git/manifests/snapshot.pp +++ b/modules/git/manifests/snapshot.pp @@ -1,6 +1,7 @@ define git::snapshot( $source, $refresh = '*/5', - $user = 'root') { + $user = 'root', + $branch = 'master') { include git::client #TODO # should handle branch -> clone -n + branch + checkout @@ -8,7 +9,7 @@ define git::snapshot( $source, # Idealy, should be handled by vcsrepo # https://github.com/bruce/puppet-vcsrepo # once it is merged in puppet - exec { "/usr/bin/git clone $source $name": + exec { "/usr/bin/git clone -b $branch $source $name": creates => $name, user => $user } -- cgit v1.2.1