OLD | NEW |
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 # Ensure there is at least one character in the respective strings; | 13 # Ensure there is at least one character in the respective strings; |
14 # see https://codereview.adblockplus.org/29329028/#msg3 | 14 # see https://codereview.adblockplus.org/29329028/#msg3 |
15 validate_re($vhost, '.+') | 15 validate_re($vhost, '.+') |
16 validate_re($repository, '.+') | 16 validate_re($repository, '.+') |
17 | 17 |
18 File { | 18 File { |
19 owner => 'root', | 19 owner => 'root', |
20 group => 'root', | 20 group => 'root', |
21 mode => 0644, | 21 mode => 0644, |
22 } | 22 } |
23 | 23 |
24 Cron { | 24 Cron { |
25 environment => ['MAILTO=admins@adblockplus.org', 'PYTHONPATH=/opt/cms:/opt/s
itescripts'], | 25 environment => concat(hiera('cron::environment', []), [ |
| 26 'PYTHONPATH=/opt/cms:/opt/sitescripts', |
| 27 ]), |
26 } | 28 } |
27 | 29 |
28 class {'nginx': | 30 class {'nginx': |
29 geoip_country => $geoip ? { | 31 geoip_country => $geoip ? { |
30 false => undef, | 32 false => undef, |
31 default => '/usr/share/GeoIP/GeoIPv6.dat', | 33 default => '/usr/share/GeoIP/GeoIPv6.dat', |
32 }, | 34 }, |
33 } | 35 } |
34 | 36 |
35 class {'geoip': | 37 class {'geoip': |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 minute => '5-55/10', | 116 minute => '5-55/10', |
115 } | 117 } |
116 | 118 |
117 cron {'update_repo': | 119 cron {'update_repo': |
118 ensure => present, | 120 ensure => present, |
119 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener
ate_static_pages /home/www/${repository} /var/www/${vhost}", | 121 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener
ate_static_pages /home/www/${repository} /var/www/${vhost}", |
120 user => www, | 122 user => www, |
121 minute => '*/10', | 123 minute => '*/10', |
122 } | 124 } |
123 } | 125 } |
OLD | NEW |