| OLD | NEW |
| 1 class notificationserver { | 1 class notificationserver($is_default = false) { |
| 2 class {'nginx': | 2 if $is_default { |
| 3 worker_processes => 2, | 3 class {'nginx': |
| 4 worker_connections => 4000, | 4 worker_processes => 2, |
| 5 ssl_session_cache => off, | 5 worker_connections => 4000, |
| 6 ssl_session_cache => off, |
| 7 } |
| 8 |
| 9 file {'/var/www': |
| 10 ensure => directory, |
| 11 owner => nginx, |
| 12 mode => 0755, |
| 13 require => Package['nginx'] |
| 14 } |
| 6 } | 15 } |
| 7 | 16 |
| 8 class {'sitescripts': | 17 class {'sitescripts': |
| 9 sitescriptsini_source => 'puppet:///modules/notificationserver/sitescripts.i
ni' | 18 sitescriptsini_source => 'puppet:///modules/notificationserver/sitescripts.i
ni' |
| 10 } | 19 } |
| 11 | 20 |
| 12 file {'/var/www': | |
| 13 ensure => directory, | |
| 14 owner => nginx, | |
| 15 mode => 0755, | |
| 16 require => Package['nginx'] | |
| 17 } | |
| 18 | |
| 19 file {'/var/www/notification': | 21 file {'/var/www/notification': |
| 20 ensure => directory, | 22 ensure => directory, |
| 21 owner => nginx, | 23 owner => nginx, |
| 22 mode => 0755, | 24 mode => 0755, |
| 23 require => Package['nginx'] | 25 require => Package['nginx'] |
| 24 } | 26 } |
| 25 | 27 |
| 26 exec { "fetch_notifications": | 28 exec { "fetch_notifications": |
| 27 command => "hg clone --noupdate https://hg.adblockplus.org/notifications /op
t/notifications && chown -R nginx /opt/notifications", | 29 command => "hg clone --noupdate https://hg.adblockplus.org/notifications /op
t/notifications && chown -R nginx /opt/notifications", |
| 28 path => ["/usr/bin/", "/bin/"], | 30 path => ["/usr/bin/", "/bin/"], |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 63 |
| 62 file {'/etc/nginx/sites-available/adblockplus.org_sslcert.pem': | 64 file {'/etc/nginx/sites-available/adblockplus.org_sslcert.pem': |
| 63 ensure => file, | 65 ensure => file, |
| 64 notify => Service['nginx'], | 66 notify => Service['nginx'], |
| 65 before => Nginx::Hostconfig['notification.adblockplus.org'], | 67 before => Nginx::Hostconfig['notification.adblockplus.org'], |
| 66 mode => 0400, | 68 mode => 0400, |
| 67 source => 'puppet:///modules/private/adblockplus.org_sslcert.pem' | 69 source => 'puppet:///modules/private/adblockplus.org_sslcert.pem' |
| 68 } | 70 } |
| 69 | 71 |
| 70 nginx::hostconfig{'notification.adblockplus.org': | 72 nginx::hostconfig{'notification.adblockplus.org': |
| 71 source => 'puppet:///modules/notificationserver/notification.adblockplus.org
', | 73 content => template('notificationserver/notification.adblockplus.org.erb'), |
| 72 enabled => true | 74 enabled => true |
| 73 } | 75 } |
| 74 | 76 |
| 75 file {'/etc/logrotate.d/nginx_notification.adblockplus.org': | 77 file {'/etc/logrotate.d/nginx_notification.adblockplus.org': |
| 76 ensure => file, | 78 ensure => file, |
| 77 mode => 0444, | 79 mode => 0444, |
| 78 require => Nginx::Hostconfig['notification.adblockplus.org'], | 80 require => Nginx::Hostconfig['notification.adblockplus.org'], |
| 79 source => 'puppet:///modules/notificationserver/logrotate' | 81 source => 'puppet:///modules/notificationserver/logrotate' |
| 80 } | 82 } |
| 81 } | 83 } |
| OLD | NEW |