From ecb858cb19ebb04c8318b2e0d5755e4c9fdcf76b Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 6 Aug 2010 22:49:39 +0200 Subject: make the cleanup of reports configurable We can now either disable reports cleanup or set the amount of days reports should be kept. By default we still cleanup reports after 30 days. --- manifests/puppetmaster/base.pp | 6 ------ manifests/puppetmaster/cleanup_reports.pp | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 manifests/puppetmaster/cleanup_reports.pp (limited to 'manifests/puppetmaster') diff --git a/manifests/puppetmaster/base.pp b/manifests/puppetmaster/base.pp index a5f7e90..a2bc9d4 100644 --- a/manifests/puppetmaster/base.pp +++ b/manifests/puppetmaster/base.pp @@ -35,10 +35,4 @@ class puppet::puppetmaster::base inherits puppet::base { notify => Service[puppetmaster], } } - - # clean up reports older than 30 days - file{'/etc/cron.daily/puppet_reports_cleanup.sh': - content => "#!/bin/bash\nfind /var/log/puppet/reports/ -maxdepth 2 -type f -ctime +30 -exec rm {} \\;\n", - owner => root, group => 0, mode => 0700; - } } diff --git a/manifests/puppetmaster/cleanup_reports.pp b/manifests/puppetmaster/cleanup_reports.pp new file mode 100644 index 0000000..4d76ceb --- /dev/null +++ b/manifests/puppetmaster/cleanup_reports.pp @@ -0,0 +1,7 @@ +class puppet::puppetmaster::cleanup_reports { + # clean up reports older than $puppetmaster_cleanup_reports days + file{'/etc/cron.daily/puppet_reports_cleanup.sh': + content => "#!/bin/bash\nfind /var/log/puppet/reports/ -maxdepth 2 -type f -ctime +${puppetmaster_cleanup_reports} -exec rm {} \\;\n", + owner => root, group => 0, mode => 0700; + } +} -- cgit v1.2.3