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

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

Issue 29785567: #11294 - Generate and store anonymized HTTPd logs (Closed)
Patch Set: #11294 - Remove $adblockplus::web::server::geoip parameter Created June 5, 2018, 1:46 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 | « modules/private-stub/hiera/base.yaml ('k') | 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,
11 ) { 10 ) {
12 11
13 include sitescripts 12 include sitescripts
14 include adblockplus::web 13 include adblockplus::web
14 include geoip
15 15
16 $remote = hiera('web::server::remote', "https://hg.adblockplus.org/${repositor y}") 16 $remote = hiera('web::server::remote', "https://hg.adblockplus.org/${repositor y}")
17 17
18 $pythonpath = 'PYTHONPATH=/opt/cms:/opt/sitescripts' 18 $pythonpath = 'PYTHONPATH=/opt/cms:/opt/sitescripts'
19 19
20 # Ensure there is at least one character in the respective strings; 20 # Ensure there is at least one character in the respective strings;
21 # see https://codereview.adblockplus.org/29329028/#msg3 21 # see https://codereview.adblockplus.org/29329028/#msg3
22 validate_re($vhost, '.+') 22 validate_re($vhost, '.+')
23 validate_re($repository, '.+') 23 validate_re($repository, '.+')
24 24
25 File { 25 File {
26 owner => 'root', 26 owner => 'root',
27 group => 'root', 27 group => 'root',
28 mode => '0644', 28 mode => '0644',
29 } 29 }
30 30
31 Cron { 31 Cron {
32 environment => concat(hiera('cron::environment', []), [ 32 environment => concat(hiera('cron::environment', []), [
33 $pythonpath, 33 $pythonpath,
34 ]), 34 ]),
35 } 35 }
36 36
37 class {'nginx': 37 class {'nginx':
38 geoip_country => $geoip ? { 38 geoip_country => '/usr/share/GeoIP/GeoIPv6.dat',
39 false => undef,
40 default => '/usr/share/GeoIP/GeoIPv6.dat',
41 },
42 }
43
44 class {'geoip':
45 cron => {hour => 0, minute => 8, monthday => 15},
46 ensure => $geoip ? {false => 'absent', default => 'present'},
47 } 39 }
48 40
49 # Make sure that apt packages corresponding to the pip-installed modules below 41 # Make sure that apt packages corresponding to the pip-installed modules below
50 # won't be installed unintentionally, these will take precedence otherwise. 42 # won't be installed unintentionally, these will take precedence otherwise.
51 package {['python-jinja2', 'python-markdown']: 43 package {['python-jinja2', 'python-markdown']:
52 ensure => 'held', 44 ensure => 'held',
53 } 45 }
54 46
55 package {'Jinja2': 47 package {'Jinja2':
56 ensure => '2.8', 48 ensure => '2.8',
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 ) 171 )
180 172
181 cron {'update_repo': 173 cron {'update_repo':
182 ensure => present, 174 ensure => present,
183 command => $update_webpage_cmd, 175 command => $update_webpage_cmd,
184 user => www, 176 user => www,
185 minute => '5-59/20', 177 minute => '5-59/20',
186 } 178 }
187 179
188 } 180 }
OLDNEW
« no previous file with comments | « modules/private-stub/hiera/base.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld