diff --git a/munin/manifests/init.pp b/munin/manifests/init.pp index 1772eb8..5c13aff 100644 --- a/munin/manifests/init.pp +++ b/munin/manifests/init.pp @@ -269,6 +269,13 @@ class munin::server { group => $apache::sslserver::group, require => Package["munin"], } + file { "/etc/logrotate.d/munin-cgi": + ensure => present, + content => template("munin/munin-cgi.logrotate.erb"), + mode => "0644", + owner => "root", + group => "root", + } file { "/var/www/html/munin/.htaccess": ensure => present, diff --git a/munin/templates/munin-cgi.logrotate.erb b/munin/templates/munin-cgi.logrotate.erb new file mode 100644 index 0000000..63df851 --- /dev/null +++ b/munin/templates/munin-cgi.logrotate.erb @@ -0,0 +1,17 @@ +/var/log/munin/munin-cgi-graph.log { + daily + missingok + rotate 7 + compress + notifempty + create 0664 munin <%= scope.lookupvar('apache::sslserver::group') %> +} + +/var/log/munin/munin-cgi-html.log { + daily + missingok + rotate 7 + compress + notifempty + create 0664 munin <%= scope.lookupvar('apache::sslserver::group') %> +}