| Index: modules/web/manifests/server.pp |
| =================================================================== |
| --- a/modules/web/manifests/server.pp |
| +++ b/modules/web/manifests/server.pp |
| @@ -1,9 +1,9 @@ |
| -class web::server($vhost, $repository) { |
| +class web::server($vhost, $repository, $multiplexer_locations = undef) { |
| File { |
| owner => 'root', |
| group => 'root', |
| mode => 0644, |
| } |
| Cron { |
| environment => ['MAILTO=admin@adblockplus.org', 'PYTHONPATH=/opt/sitescripts'], |
| @@ -31,16 +31,35 @@ class web::server($vhost, $repository) { |
| require => Nginx::Hostconfig[$vhost], |
| source => 'puppet:///modules/private/adblockplus.org_sslcert.pem', |
| } |
| class {'sitescripts': |
| sitescriptsini_source => 'puppet:///modules/web/sitescripts', |
| } |
| + if $multiplexer_locations != undef { |
| + include spawn-fcgi |
| + package {['python-flup', 'python-mysqldb']:} |
| + |
| + spawn-fcgi::pool {"multiplexer": |
| + ensure => present, |
| + fcgi_app => '/opt/sitescripts/multiplexer.fcgi', |
| + socket => '/tmp/multiplexer-fastcgi.sock', |
| + mode => '0666', |
| + user => 'nginx', |
| + children => 1, |
| + require => [ |
| + Exec["fetch_sitescripts"], |
| + Package["python-flup"], |
| + Package["python-mysqldb"], |
| + ], |
| + } |
| + } |
| + |
| user {'www': |
| ensure => present, |
| comment => 'Web content owner', |
| home => '/home/www', |
| managehome => true, |
| } |
| exec {"fetch_repo": |