diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/apache/manifests/init.pp | 8 | ||||
-rw-r--r-- | modules/apache/templates/logrotate | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/modules/apache/manifests/init.pp b/modules/apache/manifests/init.pp index 2baf6df7..9e57c7e4 100644 --- a/modules/apache/manifests/init.pp +++ b/modules/apache/manifests/init.pp @@ -40,6 +40,14 @@ class apache { content => template("apache/00_default_vhosts.conf") } + file { "/etc/logrotate.d/httpd": + ensure => "present", + owner => root, + group => root, + mode => 644, + content => template("apache/logrotate") + } + } class mod_php inherits base { diff --git a/modules/apache/templates/logrotate b/modules/apache/templates/logrotate new file mode 100644 index 00000000..56805675 --- /dev/null +++ b/modules/apache/templates/logrotate @@ -0,0 +1,13 @@ +/var/log/httpd/*_log /var/log/httpd/apache_runtime_status /var/log/httpd/ssl_mutex { + rotate 5 + monthly + missingok + notifempty + nocompress + prerotate + /etc/rc.d/init.d/httpd closelogs > /dev/null 2>&1 || : + endscript + postrotate + /etc/rc.d/init.d/httpd closelogs > /dev/null 2>&1 || : + endscript +} |