summaryrefslogtreecommitdiff
path: root/manifests/puppetmaster/cleanup_reports.pp
blob: 664bd81d472cd23a12c0f0bd56329fa553a3d5b5 (plain)
1
2
3
4
5
6
7
8
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/lib/puppet/reports/ -maxdepth 2 -type f -ctime +${puppetmaster_cleanup_reports} -exec rm {} \\;\n",
    owner => root, group => 0, mode => 0700;
  }
}