From 1a91a29e74c42acf740bfb6d0fa391674c1953bf Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 3 Jun 2009 22:00:01 +0200 Subject: introduced logrotate only if we have vhosts otherwise we get nasty logrotate errors introduced a first logrotate naming scheme. the openbsd logrotation should be integrated in that one as well. --- manifests/logrotate/centos.pp | 8 ++++++++ manifests/logrotate/centos/vhosts.pp | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 manifests/logrotate/centos.pp create mode 100644 manifests/logrotate/centos/vhosts.pp (limited to 'manifests/logrotate') diff --git a/manifests/logrotate/centos.pp b/manifests/logrotate/centos.pp new file mode 100644 index 0000000..6571ada --- /dev/null +++ b/manifests/logrotate/centos.pp @@ -0,0 +1,8 @@ +class apache::logrotate::centos { + # add vhost folders to logrotation + augeas{'logrotate_httpd': + changes => [ 'rm /files/etc/logrotate.d/httpd/rule/file', + 'ins file before /files/etc/logrotate.d/httpd/rule/*[1]', + 'set /files/etc/logrotate.d/httpd/rule/file[1] /var/log/httpd/*log' ], + } +} diff --git a/manifests/logrotate/centos/vhosts.pp b/manifests/logrotate/centos/vhosts.pp new file mode 100644 index 0000000..941f50d --- /dev/null +++ b/manifests/logrotate/centos/vhosts.pp @@ -0,0 +1,10 @@ +class apache::logrotate::centos::vhosts inherits apache::logrotate::centos { + # add vhost folders to logrotation + Augeas['logrotate_httpd']{ + changes => [ 'rm /files/etc/logrotate.d/httpd/rule/file', + 'ins file before /files/etc/logrotate.d/httpd/rule/*[1]', + 'ins file before /files/etc/logrotate.d/httpd/rule/*[1]', + 'set /files/etc/logrotate.d/httpd/rule/file[1] /var/log/httpd/*log', + 'set /files/etc/logrotate.d/httpd/rule/file[2] /var/www/vhosts/*/logs/*log' ], + } +} -- cgit v1.2.3