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 $formmail = hiera('web::server::formmail', undef), |
11 ) { | 12 ) { |
12 | 13 |
13 include sitescripts | 14 include sitescripts |
14 | 15 |
| 16 if $formmail != undef { |
| 17 ensure_resource('file', 'formmail', merge({ |
| 18 ensure => absent, |
| 19 }, $formmail)) |
| 20 } |
| 21 |
15 $PYTHONPATH = 'PYTHONPATH=/opt/cms:/opt/sitescripts' | 22 $PYTHONPATH = 'PYTHONPATH=/opt/cms:/opt/sitescripts' |
16 | 23 |
17 # Ensure there is at least one character in the respective strings; | 24 # Ensure there is at least one character in the respective strings; |
18 # see https://codereview.adblockplus.org/29329028/#msg3 | 25 # see https://codereview.adblockplus.org/29329028/#msg3 |
19 validate_re($vhost, '.+') | 26 validate_re($vhost, '.+') |
20 validate_re($repository, '.+') | 27 validate_re($repository, '.+') |
21 | 28 |
22 File { | 29 File { |
23 owner => 'root', | 30 owner => 'root', |
24 group => 'root', | 31 group => 'root', |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 ) | 171 ) |
165 | 172 |
166 cron {'update_repo': | 173 cron {'update_repo': |
167 ensure => present, | 174 ensure => present, |
168 command => $update_webpage_cmd, | 175 command => $update_webpage_cmd, |
169 user => www, | 176 user => www, |
170 minute => '5-59/20', | 177 minute => '5-59/20', |
171 } | 178 } |
172 | 179 |
173 } | 180 } |
OLD | NEW |