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

Delta Between Two Patch Sets: modules/downloadserver/manifests/init.pp

Issue 29750621: #10073 - Fix provisioning of downloadserver role (Closed)
Left Patch Set: Created April 12, 2018, 9:10 p.m.
Right Patch Set: For comments 2 and 3 Created April 13, 2018, 9:14 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 class downloadserver( 1 class downloadserver(
2 $domain, 2 $domain,
3 $certificate, 3 $certificate,
4 $private_key, 4 $private_key,
5 $is_default = false 5 $is_default = false
6 ) { 6 ) {
7 7
8 include adblockplus::web 8 include adblockplus::web
9 9
10 class {'nginx': 10 class {'nginx':
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 exec { "fetch_downloads": 49 exec { "fetch_downloads":
50 command => "hg clone https://hg.adblockplus.org/downloads /var/www/downloads ", 50 command => "hg clone https://hg.adblockplus.org/downloads /var/www/downloads ",
51 path => ["/usr/bin/", "/bin/"], 51 path => ["/usr/bin/", "/bin/"],
52 user => hg, 52 user => hg,
53 require => [ 53 require => [
54 Package['mercurial'], 54 Package['mercurial'],
55 File['/var/www/downloads'], 55 File['/var/www/downloads'],
56 ], 56 ],
57 timeout => 0, 57 timeout => 0,
58 onlyif => "test ! -d /var/www/downloads/.hg" 58 creates => "/var/www/downloads/.hg/hgrc"
mathias 2018/04/13 04:30:54 This should be replaced by a `creates` attribute.
f.lopez 2018/04/13 21:13:20 Acknowledged.
59 } 59 }
60 60
61 File { 61 File {
62 owner => root, 62 owner => root,
63 group => root, 63 group => root,
64 mode => '0644', 64 mode => '0644',
65 } 65 }
66 66
67 nginx::hostconfig{$domain: 67 nginx::hostconfig{$domain:
68 source => 'puppet:///modules/downloadserver/site.conf', 68 source => 'puppet:///modules/downloadserver/site.conf',
(...skipping 10 matching lines...) Expand all
79 } 79 }
80 80
81 cron {'mirror': 81 cron {'mirror':
82 ensure => present, 82 ensure => present,
83 command => 'hg pull -q -u -R /var/www/downloads/', 83 command => 'hg pull -q -u -R /var/www/downloads/',
84 environment => hiera('cron::environment', []), 84 environment => hiera('cron::environment', []),
85 user => hg, 85 user => hg,
86 minute => '3-59/20' 86 minute => '3-59/20'
87 } 87 }
88 88
89 package { 'rsync': 89 ensure_packages([
mathias 2018/04/13 04:30:54 Please use ensure_packages() when requiring a pack
f.lopez 2018/04/13 21:13:20 Acknowledged.
90 ensure => present, 90 'rsync',
91 } 91 ])
92 92
93 file {'/var/www/devbuilds': 93 file {'/var/www/devbuilds':
94 ensure => directory, 94 ensure => directory,
95 owner => rsync 95 owner => rsync
96 } 96 }
97 97
98 user {'rsync': 98 user {'rsync':
99 ensure => present, 99 ensure => present,
100 home => '/home/rsync', 100 home => '/home/rsync',
101 managehome => true 101 managehome => true
(...skipping 24 matching lines...) Expand all
126 ensure => present, 126 ensure => present,
127 require => [ 127 require => [
128 File['/home/rsync/.ssh/id_rsa'], 128 File['/home/rsync/.ssh/id_rsa'],
129 File['/var/www/devbuilds'], 129 File['/var/www/devbuilds'],
130 Package['rsync'], 130 Package['rsync'],
131 ], 131 ],
132 command => 'rsync -e ssh -ltprz --delete devbuilds@buildmaster.adblockplus.o rg:. /var/www/devbuilds', 132 command => 'rsync -e ssh -ltprz --delete devbuilds@buildmaster.adblockplus.o rg:. /var/www/devbuilds',
133 environment => hiera('cron::environment', []), 133 environment => hiera('cron::environment', []),
134 user => rsync, 134 user => rsync,
135 hour => '*', 135 hour => '*',
136 minute => '4-54/10', 136 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.
137 } 137 }
138 } 138 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld