diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-05-24 10:21:10 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-05-24 10:21:10 +0000 |
commit | 0531e92130abf093e49a929578f7b1c73d02f1dd (patch) | |
tree | d2fcddd83c72a79460ea690d097b760d1ef12ac7 /modules/apache | |
parent | 08dd61bdb93a7005576c380be4d04527da791c30 (diff) | |
download | puppet-0531e92130abf093e49a929578f7b1c73d02f1dd.tar puppet-0531e92130abf093e49a929578f7b1c73d02f1dd.tar.gz puppet-0531e92130abf093e49a929578f7b1c73d02f1dd.tar.bz2 puppet-0531e92130abf093e49a929578f7b1c73d02f1dd.tar.xz puppet-0531e92130abf093e49a929578f7b1c73d02f1dd.zip |
add logrotate config
Diffstat (limited to 'modules/apache')
-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 +} |