| Index: modules/updateserver/manifests/init.pp |
| =================================================================== |
| --- a/modules/updateserver/manifests/init.pp |
| +++ b/modules/updateserver/manifests/init.pp |
| @@ -1,9 +1,12 @@ |
| -class updateserver { |
| +class updateserver( |
| + $domain, |
| + $is_default=false |
| + ) { |
| class {'nginx': |
| worker_processes => 2, |
| worker_connections => 4000, |
| ssl_session_cache => off, |
| } |
| File { |
| owner => root, |
| @@ -27,36 +30,16 @@ class updateserver { |
| } |
| file {'/var/www/update/adblockplusie/update.json': |
| ensure => file, |
| source => 'puppet:///modules/updateserver/adblockplusie/update.json', |
| mode => 0644 |
| } |
| - file {'/etc/nginx/sites-available/adblockplus.org_sslcert.key': |
| - ensure => file, |
| - notify => Service['nginx'], |
| - before => Nginx::Hostconfig['update.adblockplus.org'], |
| - mode => 0400, |
| - source => 'puppet:///modules/private/adblockplus.org_sslcert.key' |
| - } |
| - |
| - file {'/etc/nginx/sites-available/adblockplus.org_sslcert.pem': |
| - ensure => file, |
| - notify => Service['nginx'], |
| - before => Nginx::Hostconfig['update.adblockplus.org'], |
| - mode => 0400, |
| - source => 'puppet:///modules/private/adblockplus.org_sslcert.pem' |
| - } |
| - |
| - nginx::hostconfig{'update.adblockplus.org': |
| - source => 'puppet:///modules/updateserver/update.adblockplus.org', |
| - enabled => true |
| - } |
| - |
| - file {'/etc/logrotate.d/nginx_update.adblockplus.org': |
| - ensure => file, |
| - mode => 0444, |
| - require => Nginx::Hostconfig['update.adblockplus.org'], |
| - source => 'puppet:///modules/updateserver/logrotate' |
| + nginx::hostconfig{$domain: |
| + source => 'puppet:///modules/updateserver/site.conf', |
| + is_default => $is_default, |
| + certificate => 'adblockplus.org_sslcert.pem', |
| + private_key => 'adblockplus.org_sslcert.key', |
| + log => 'access_log_update' |
| } |
| } |