Parent Directory | Revision Log
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 |