aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/git/manifests/snapshot.pp5
1 files changed, 3 insertions, 2 deletions
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
}