summaryrefslogtreecommitdiff
path: root/manifests/master/cleanup_reports.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/master/cleanup_reports.pp')
-rw-r--r--manifests/master/cleanup_reports.pp7
1 files changed, 7 insertions, 0 deletions
diff --git a/manifests/master/cleanup_reports.pp b/manifests/master/cleanup_reports.pp
new file mode 100644
index 0000000..98cb81a
--- /dev/null
+++ b/manifests/master/cleanup_reports.pp
@@ -0,0 +1,7 @@
+class puppet::master::cleanup_reports {
+ # clean up reports older than $puppetmaster_cleanup_reports days
+ file { '/etc/cron.daily/puppet_reports_cleanup.sh':
+ content => "#!/bin/bash\nfind ${puppet::master::reports_dir} -maxdepth 2 -type f -ctime +${puppet::master::cleanup_reports} -exec rm {} \\;\n",
+ owner => root, group => 0, mode => 0700;
+ }
+}