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: For comments 2 and 3 Created April 13, 2018, 9:14 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"
+ creates => "/var/www/downloads/.hg/hgrc"
}
File {
@@ -76,6 +86,10 @@
minute => '3-59/20'
}
+ ensure_packages([
+ 'rsync',
+ ])
+
file {'/var/www/devbuilds':
ensure => directory,
owner => rsync
@@ -110,8 +124,11 @@
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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld