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