/[adm]/puppet/modules/git/manifests/snapshot.pp
ViewVC logotype

Contents of /puppet/modules/git/manifests/snapshot.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3276 - (show annotations) (download)
Sat Jul 6 16:54:06 2013 UTC (10 years, 9 months ago) by boklm
File size: 676 byte(s)
git::snapshot: don't add cron if $refresh == '0'
1 define git::snapshot( $source,
2 $refresh = '*/5',
3 $user = 'root') {
4 include git::client
5 #TODO
6 # should handle branch -> clone -n + branch + checkout
7 # create a script
8 # Idealy, should be handled by vcsrepo
9 # https://github.com/bruce/puppet-vcsrepo
10 # once it is merged in puppet
11 exec { "/usr/bin/git clone $source $name":
12 creates => $name,
13 user => $user
14 }
15
16 if ($refresh != '0') {
17 cron { "update $name":
18 # FIXME no -q ?
19 command => "cd $name && /usr/bin/git pull",
20 user => $user,
21 minute => $refresh
22 }
23 }
24 }

  ViewVC Help
Powered by ViewVC 1.1.30