1 |
define git::snapshot( $source, |
define git::snapshot( $source, |
2 |
$refresh = '*/5', |
$refresh = '*/5', |
3 |
$user = 'root') { |
$user = 'root', |
4 |
|
$branch = 'master') { |
5 |
include git::client |
include git::client |
6 |
#TODO |
#TODO |
7 |
# should handle branch -> clone -n + branch + checkout |
# should handle branch -> clone -n + branch + checkout |
9 |
# Idealy, should be handled by vcsrepo |
# Idealy, should be handled by vcsrepo |
10 |
# https://github.com/bruce/puppet-vcsrepo |
# https://github.com/bruce/puppet-vcsrepo |
11 |
# once it is merged in puppet |
# once it is merged in puppet |
12 |
exec { "/usr/bin/git clone $source $name": |
exec { "/usr/bin/git clone -b $branch $source $name": |
13 |
creates => $name, |
creates => $name, |
14 |
user => $user |
user => $user |
15 |
} |
} |