diff options
author | mh <mh@immerda.ch> | 2010-08-06 22:49:39 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2010-08-06 22:49:39 +0200 |
commit | ecb858cb19ebb04c8318b2e0d5755e4c9fdcf76b (patch) | |
tree | 6cc0a0d09908f6cd58bc2f3606cc6fe5a8730d93 /manifests/puppetmaster/cleanup_reports.pp | |
parent | f22235b5eda08f3d5503162484c9e2214bc78ecd (diff) |
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.
Diffstat (limited to 'manifests/puppetmaster/cleanup_reports.pp')
-rw-r--r-- | manifests/puppetmaster/cleanup_reports.pp | 7 |
1 files changed, 7 insertions, 0 deletions
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; + } +} |