Index: modules/updateserver/manifests/init.pp |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/modules/updateserver/manifests/init.pp |
@@ -0,0 +1,65 @@ |
+class updateserver { |
+ class {'nginx': |
+ worker_processes => 2, |
+ worker_connections => 4000, |
+ ssl_session_cache => off, |
+ } |
+ |
+ File { |
+ owner => root, |
+ group => root, |
+ mode => 0644, |
+ } |
Wladimir Palant
2013/08/16 13:11:02
I would rather move this down - this is only relev
Felix Dahlke
2013/08/16 14:07:53
Keeping all files owned by root, as discussed.
|
+ |
+ file {'/var/www': |
+ ensure => directory, |
+ owner => nginx, |
+ mode => 0755, |
+ require => Package['nginx'] |
+ } |
+ |
+ file {'/var/www/update': |
+ ensure => directory, |
+ owner => nginx, |
+ mode => 0755 |
+ } |
+ |
+ file {'/var/www/update/adblockplusie': |
+ ensure => directory, |
+ owner => nginx, |
+ mode => 0755 |
+ } |
+ |
+ file {'/var/www/update/adblockplusie/update.json': |
+ ensure => file, |
Wladimir Palant
2013/08/16 13:11:02
Maybe use nginx/0644 rather than having root as ow
Felix Dahlke
2013/08/16 14:07:53
As discussed, owner is root for now.
|
+ source => 'puppet:///modules/updateserver/adblockplusie/update.json' |
+ } |
+ |
+ 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' |
+ } |
+} |