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

Side by Side Diff: modules/web/manifests/server.pp

Issue 29481665: #1980 - Introduce puppet class adblockplus_web in webserver module (Closed)
Patch Set: Created July 6, 2017, 2:10 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 class web::server( 1 class web::server(
2 $vhost, 2 $vhost,
3 $repository, 3 $repository,
4 $certificate = hiera('web::server::certificate', 'undef'), 4 $certificate = hiera('web::server::certificate', 'undef'),
5 $private_key = hiera('web::server::private_key', 'undef'), 5 $private_key = hiera('web::server::private_key', 'undef'),
6 $is_default = false, 6 $is_default = false,
7 $aliases = undef, 7 $aliases = undef,
8 $custom_config = undef, 8 $custom_config = undef,
9 $multiplexer_locations = undef, 9 $multiplexer_locations = undef,
10 $geoip = false, 10 $geoip = false,
11 ) { 11 ) {
12 12
13 include sitescripts 13 include sitescripts
14 include adblockplus::web
14 15
15 $pythonpath = 'PYTHONPATH=/opt/cms:/opt/sitescripts' 16 $pythonpath = 'PYTHONPATH=/opt/cms:/opt/sitescripts'
16 17
17 # Ensure there is at least one character in the respective strings; 18 # Ensure there is at least one character in the respective strings;
18 # see https://codereview.adblockplus.org/29329028/#msg3 19 # see https://codereview.adblockplus.org/29329028/#msg3
19 validate_re($vhost, '.+') 20 validate_re($vhost, '.+')
20 validate_re($repository, '.+') 21 validate_re($repository, '.+')
21 22
22 File { 23 File {
23 owner => 'root', 24 owner => 'root',
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 ] 138 ]
138 139
139 exec {"initialize_content": 140 exec {"initialize_content":
140 command => shellquote($initialize_content_exec), 141 command => shellquote($initialize_content_exec),
141 user => www, 142 user => www,
142 subscribe => [Exec["fetch_repo"], Exec["fetch_cms"]], 143 subscribe => [Exec["fetch_repo"], Exec["fetch_cms"]],
143 refreshonly => true, 144 refreshonly => true,
144 environment => $pythonpath, 145 environment => $pythonpath,
145 } 146 }
146 147
147 file {'/var/www':
148 ensure => directory,
149 mode => '0755',
150 }
151
152 file {[ 148 file {[
153 "/var/cache/$repository", 149 "/var/cache/$repository",
154 "/var/www/$vhost", 150 "/var/www/$vhost",
155 "/var/www/docs", 151 "/var/www/docs",
156 ]: 152 ]:
157 ensure => directory, 153 ensure => directory,
158 owner => www, 154 owner => www,
159 mode => '0755', 155 mode => '0755',
160 } 156 }
161 157
(...skipping 25 matching lines...) Expand all
187 ) 183 )
188 184
189 cron {'update_repo': 185 cron {'update_repo':
190 ensure => present, 186 ensure => present,
191 command => $update_webpage_cmd, 187 command => $update_webpage_cmd,
192 user => www, 188 user => www,
193 minute => '5-59/20', 189 minute => '5-59/20',
194 } 190 }
195 191
196 } 192 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld