| LEFT | RIGHT |
| 1 class web::server( | 1 class web::server( |
| 2 $vhost, | 2 $vhost, |
| 3 $repository, | 3 $repository, |
| 4 $certificate = hiera('web::server::certificate'), | 4 $certificate = hiera('web::server::certificate', 'undef'), |
| 5 $private_key = hiera('web::server::private_key'), | 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 File { | 10 File { |
| 11 owner => 'root', | 11 owner => 'root', |
| 12 group => 'root', | 12 group => 'root', |
| 13 mode => 0644, | 13 mode => 0644, |
| 14 } | 14 } |
| 15 | 15 |
| 16 Cron { | 16 Cron { |
| 17 environment => ['MAILTO=admins@adblockplus.org', 'PYTHONPATH=/opt/cms:/opt/s
itescripts'], | 17 environment => ['MAILTO=admins@adblockplus.org', 'PYTHONPATH=/opt/cms:/opt/s
itescripts'], |
| 18 } | 18 } |
| 19 | 19 |
| 20 include nginx | 20 include nginx |
| 21 | 21 |
| 22 package {['python-jinja2', 'python-markdown']:} | 22 package {['python-jinja2', 'python-markdown']:} |
| 23 | 23 |
| 24 nginx::hostconfig {$vhost: | 24 nginx::hostconfig {$vhost: |
| 25 content => template('web/site.conf.erb'), | 25 content => template('web/site.conf.erb'), |
| 26 global_config => template('web/global.conf.erb'), | 26 global_config => template('web/global.conf.erb'), |
| 27 is_default => $is_default, | 27 is_default => $is_default, |
| 28 certificate => $certificate, | 28 certificate => $certificate ? {'undef' => undef, default => $certificate}, |
| 29 private_key => $private_key, | 29 private_key => $private_key ? {'undef' => undef, default => $private_key}, |
| 30 log => "access_log_$vhost" | 30 log => "access_log_$vhost" |
| 31 } | 31 } |
| 32 | 32 |
| 33 if $multiplexer_locations != undef { | 33 if $multiplexer_locations != undef { |
| 34 include spawn-fcgi | 34 include spawn-fcgi |
| 35 package {'python-flup':} | 35 package {'python-flup':} |
| 36 | 36 |
| 37 class {'sitescripts': | 37 class {'sitescripts': |
| 38 sitescriptsini_source => 'puppet:///modules/web/sitescripts', | 38 sitescriptsini_source => 'puppet:///modules/web/sitescripts', |
| 39 } | 39 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 minute => '5-55/10', | 93 minute => '5-55/10', |
| 94 } | 94 } |
| 95 | 95 |
| 96 cron {'update_repo': | 96 cron {'update_repo': |
| 97 ensure => present, | 97 ensure => present, |
| 98 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener
ate_static_pages /home/www/${repository} /var/www/${vhost}", | 98 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener
ate_static_pages /home/www/${repository} /var/www/${vhost}", |
| 99 user => www, | 99 user => www, |
| 100 minute => '*/10', | 100 minute => '*/10', |
| 101 } | 101 } |
| 102 } | 102 } |
| LEFT | RIGHT |