OLD | NEW |
1 define adblockplus::sitescripts::repository ( | 1 define adblockplus::sitescripts::repository ( |
2 $location = "/opt/$name", | 2 $location = "/opt/$name", |
3 $source = "https://hg.adblockplus.org/$name", | 3 $source = "https://hg.adblockplus.org/$name", |
4 ) { | 4 ) { |
5 | 5 |
6 ensure_packages([ | 6 ensure_packages([ |
7 'python', | 7 'python', |
8 'python-flup', | 8 'python-flup', |
9 ]) | 9 ]) |
10 | 10 |
11 $ensure_dependencies_command = shellquote([ | 11 $ensure_dependencies_command = join([ |
12 'python', '--', "$location/ensure_dependencies.py", '-q' | 12 shellquote(['cd', $location]), |
13 ]) | 13 shellquote(['python', 'ensure_dependencies.py', '-q']), |
| 14 ], ' && ') |
14 | 15 |
15 $fetch_command = join([ | 16 $fetch_command = join([ |
16 shellquote(['hg', 'clone', $source, $location]), | 17 shellquote(['hg', 'clone', $source, $location]), |
17 $ensure_dependencies_command, | 18 $ensure_dependencies_command, |
18 ], ' && ') | 19 ], ' && ') |
19 | 20 |
20 exec { "fetch_$name": | 21 exec { "fetch_$name": |
21 command => shellquote(['hg', 'clone', $source, $location]), | 22 command => shellquote(['hg', 'clone', $source, $location]), |
22 creates => $location, | 23 creates => $location, |
23 path => ['/usr/bin/', '/bin/'], | 24 path => ['/usr/bin/', '/bin/'], |
(...skipping 11 matching lines...) Expand all Loading... |
35 cron {"update_$name": | 36 cron {"update_$name": |
36 ensure => 'present', | 37 ensure => 'present', |
37 command => $update_command, | 38 command => $update_command, |
38 environment => hiera('cron::environment', []), | 39 environment => hiera('cron::environment', []), |
39 user => 'root', | 40 user => 'root', |
40 minute => [15], | 41 minute => [15], |
41 } | 42 } |
42 | 43 |
43 Cron["update_$name"] <- Exec["fetch_$name"] | 44 Cron["update_$name"] <- Exec["fetch_$name"] |
44 } | 45 } |
OLD | NEW |