Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/downloadserver/manifests/init.pp

Issue 29750621: #10073 - Fix provisioning of downloadserver role (Closed)
Patch Set: Created April 12, 2018, 9:10 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld