Index: modules/downloadserver/manifests/init.pp |
=================================================================== |
--- a/modules/downloadserver/manifests/init.pp |
+++ b/modules/downloadserver/manifests/init.pp |
@@ -39,13 +39,23 @@ |
managehome => true |
} |
+ file { '/var/www/downloads': |
+ ensure => 'directory', |
+ mode => '0755', |
+ group => 'hg', |
+ owner => 'hg', |
+ } |
+ |
exec { "fetch_downloads": |
command => "hg clone https://hg.adblockplus.org/downloads /var/www/downloads", |
path => ["/usr/bin/", "/bin/"], |
- require => Package['mercurial'], |
user => hg, |
+ require => [ |
+ Package['mercurial'], |
+ File['/var/www/downloads'], |
+ ], |
timeout => 0, |
- onlyif => "test ! -d /var/www/downloads" |
+ onlyif => "test ! -d /var/www/downloads/.hg" |
mathias
2018/04/13 04:30:54
This should be replaced by a `creates` attribute.
f.lopez
2018/04/13 21:13:20
Acknowledged.
|
} |
File { |
@@ -76,6 +86,10 @@ |
minute => '3-59/20' |
} |
+ package { 'rsync': |
mathias
2018/04/13 04:30:54
Please use ensure_packages() when requiring a pack
f.lopez
2018/04/13 21:13:20
Acknowledged.
|
+ ensure => present, |
+ } |
+ |
file {'/var/www/devbuilds': |
ensure => directory, |
owner => rsync |
@@ -110,12 +124,15 @@ |
cron {'mirror-devbuilds': |
ensure => present, |
- require => [File['/home/rsync/.ssh/id_rsa'], |
- File['/var/www/devbuilds']], |
+ require => [ |
+ File['/home/rsync/.ssh/id_rsa'], |
+ File['/var/www/devbuilds'], |
+ Package['rsync'], |
+ ], |
command => 'rsync -e ssh -ltprz --delete devbuilds@buildmaster.adblockplus.org:. /var/www/devbuilds', |
environment => hiera('cron::environment', []), |
user => rsync, |
hour => '*', |
- minute => '4-54/10' |
+ minute => '4-54/10', |
mathias
2018/04/13 04:30:54
This unrelated improvement is unrelated.
f.lopez
2018/04/13 21:13:20
Acknowledged.
|
} |
} |