/[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 3429 - (show annotations) (download)
Sun Mar 23 20:53:23 2014 UTC (10 years ago) by colin
File size: 732 byte(s)
git: Make git pulls silent.

This avoids the 'Already up to date.' messages and mirrors
what the subversion module does.
1 define git::snapshot( $source,
2 $refresh = '*/5',
3 $user = 'root',
4 $branch = 'master') {
5 include git::client
6 #TODO
7 # should handle branch -> clone -n + branch + checkout
8 # create a script
9 # Idealy, should be handled by vcsrepo
10 # https://github.com/bruce/puppet-vcsrepo
11 # once it is merged in puppet
12 exec { "/usr/bin/git clone -b $branch $source $name":
13 creates => $name,
14 user => $user
15 }
16
17 if ($refresh != '0') {
18 cron { "update $name":
19 # FIXME no -q ?
20 command => "cd $name && /usr/bin/git -q pull",
21 user => $user,
22 minute => $refresh
23 }
24 }
25 }

  ViewVC Help
Powered by ViewVC 1.1.30