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 include sitescripts |
| 14 |
13 # Ensure there is at least one character in the respective strings; | 15 # Ensure there is at least one character in the respective strings; |
14 # see https://codereview.adblockplus.org/29329028/#msg3 | 16 # see https://codereview.adblockplus.org/29329028/#msg3 |
15 validate_re($vhost, '.+') | 17 validate_re($vhost, '.+') |
16 validate_re($repository, '.+') | 18 validate_re($repository, '.+') |
17 | 19 |
18 File { | 20 File { |
19 owner => 'root', | 21 owner => 'root', |
20 group => 'root', | 22 group => 'root', |
21 mode => 0644, | 23 mode => 0644, |
22 } | 24 } |
(...skipping 24 matching lines...) Expand all Loading... |
47 is_default => $is_default, | 49 is_default => $is_default, |
48 certificate => $certificate ? {'undef' => undef, default => $certificate}, | 50 certificate => $certificate ? {'undef' => undef, default => $certificate}, |
49 private_key => $private_key ? {'undef' => undef, default => $private_key}, | 51 private_key => $private_key ? {'undef' => undef, default => $private_key}, |
50 log => "access_log_$vhost" | 52 log => "access_log_$vhost" |
51 } | 53 } |
52 | 54 |
53 if $multiplexer_locations != undef { | 55 if $multiplexer_locations != undef { |
54 include spawn-fcgi | 56 include spawn-fcgi |
55 package {'python-flup':} | 57 package {'python-flup':} |
56 | 58 |
57 class {'sitescripts': | 59 sitescripts::configfragment {$title: |
58 sitescriptsini_source => 'puppet:///modules/web/sitescripts', | 60 source => 'puppet:///modules/web/sitescripts', |
59 } | 61 } |
60 | 62 |
61 spawn-fcgi::pool {"multiplexer": | 63 spawn-fcgi::pool {"multiplexer": |
62 ensure => present, | 64 ensure => present, |
63 fcgi_app => '/opt/sitescripts/multiplexer.fcgi', | 65 fcgi_app => '/opt/sitescripts/multiplexer.fcgi', |
64 socket => '/tmp/multiplexer-fastcgi.sock', | 66 socket => '/tmp/multiplexer-fastcgi.sock', |
65 mode => '0666', | 67 mode => '0666', |
66 user => 'nginx', | 68 user => 'nginx', |
67 children => 1, | 69 children => 1, |
68 require => [ | 70 require => [ |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 Class['sitescripts'], | 157 Class['sitescripts'], |
156 Exec['install_jsdoc'], | 158 Exec['install_jsdoc'], |
157 Package['make', 'doxygen'], | 159 Package['make', 'doxygen'], |
158 File['/var/www/docs'], | 160 File['/var/www/docs'], |
159 ], | 161 ], |
160 command => 'python -m sitescripts.docs.bin.generate_docs', | 162 command => 'python -m sitescripts.docs.bin.generate_docs', |
161 user => www, | 163 user => www, |
162 minute => '5-55/10', | 164 minute => '5-55/10', |
163 } | 165 } |
164 } | 166 } |
OLD | NEW |