diff options
author | mh <mh@immerda.ch> | 2011-07-07 01:24:29 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2011-07-07 01:24:29 +0200 |
commit | b3dc59ba25d05529936736297334ce86b402445f (patch) | |
tree | 56230c26ed3a7b8dc6886fe0ebac655c765bb55f | |
parent | 9a18424b2bdf3506737a28ca56a25e20950d6d68 (diff) |
implement setting reports cleanup dir the old way
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | manifests/puppetmaster/cleanup_reports.pp | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -68,6 +68,9 @@ values: * 'X', where X is the amount of days you want to keep reports for * false, to disable reports cleanup +If your reports are in a different place than the default, you can set +$puppetmaster_reports dir to adjust their location. + Check last run: --------------- diff --git a/manifests/puppetmaster/cleanup_reports.pp b/manifests/puppetmaster/cleanup_reports.pp index 664bd81..005a4d7 100644 --- a/manifests/puppetmaster/cleanup_reports.pp +++ b/manifests/puppetmaster/cleanup_reports.pp @@ -1,8 +1,8 @@ class puppet::puppetmaster::cleanup_reports { - + case $puppetmaster_reports_dir { '',undef: { $puppetmaster_reports_dir = '/var/lib/puppet/reports' } } # clean up reports older than $puppetmaster_cleanup_reports days file { '/etc/cron.daily/puppet_reports_cleanup.sh': - content => "#!/bin/bash\nfind /var/lib/puppet/reports/ -maxdepth 2 -type f -ctime +${puppetmaster_cleanup_reports} -exec rm {} \\;\n", + content => "#!/bin/bash\nfind ${puppetmaster_reports_dir} -maxdepth 2 -type f -ctime +${puppetmaster_cleanup_reports} -exec rm {} \\;\n", owner => root, group => 0, mode => 0700; } } |