summaryrefslogtreecommitdiff
path: root/manifests/master/cleanup_reports.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-06-05 18:59:39 -0300
committermh <mh@immerda.ch>2012-06-08 13:09:47 -0300
commit09c8eaf304d1075980d8d9143545f2f16a1db34d (patch)
tree57ab2c761e74eb95f873b72a109c2a620656469b /manifests/master/cleanup_reports.pp
parentaf97bf0e96167e916e36110eb858f257ccf083e6 (diff)
new style for 2.7
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;
+ }
+}