diff options
-rw-r--r-- | deployment/websites/manifests/www.pp | 3 | ||||
-rw-r--r-- | modules/apache/manifests/base.pp | 7 | ||||
-rw-r--r-- | modules/apache/manifests/var.pp | 7 | ||||
-rw-r--r-- | modules/apache/templates/logrotate | 2 |
4 files changed, 11 insertions, 8 deletions
diff --git a/deployment/websites/manifests/www.pp b/deployment/websites/manifests/www.pp index 03498084..9086c3af 100644 --- a/deployment/websites/manifests/www.pp +++ b/deployment/websites/manifests/www.pp @@ -4,6 +4,7 @@ class websites::www { $vhostdir = "$websites::base::webdatadir/$vhost" $svn_location = "svn://svn.$::domain/svn/web/www/trunk" + include apache::var include apache::mod::php include apache::mod::geoip @@ -17,7 +18,7 @@ class websites::www { file { "$vhostdir/var/tmp/cache": ensure => directory, - group => $apache::base::apache_group, + group => $apache::var::apache_group, mode => '0660', } diff --git a/modules/apache/manifests/base.pp b/modules/apache/manifests/base.pp index 1af8c256..2232e78e 100644 --- a/modules/apache/manifests/base.pp +++ b/modules/apache/manifests/base.pp @@ -1,10 +1,5 @@ class apache::base { - - # number of time the log file are rotated before being removed - $httpdlogs_rotate = '24' - - $apache_user = 'apache' - $apache_group = 'apache' + include apache::var package { 'apache-mpm-prefork': } diff --git a/modules/apache/manifests/var.pp b/modules/apache/manifests/var.pp new file mode 100644 index 00000000..636b9bc5 --- /dev/null +++ b/modules/apache/manifests/var.pp @@ -0,0 +1,7 @@ +# $httpdlogs_rotate: +# number of time the log file are rotated before being removed +class apache::var( + $httpdlogs_rotate = '24', + $apache_user = 'apache', + $apache_group = 'apache' +) {} diff --git a/modules/apache/templates/logrotate b/modules/apache/templates/logrotate index f84ae9fe..b144b2a2 100644 --- a/modules/apache/templates/logrotate +++ b/modules/apache/templates/logrotate @@ -1,5 +1,5 @@ /var/log/httpd/*_log /var/log/httpd/apache_runtime_status /var/log/httpd/ssl_mutex { - rotate <%= httpdlogs_rotate %> + rotate <%= scope.lookupvar('apache::var::httpdlogs_rotate') %> monthly missingok notifempty |