Merge "Delete json reports when we delete yaml reports"

This commit is contained in:
Jenkins 2016-02-16 00:42:22 +00:00 committed by Gerrit Code Review
commit 6071a398f7

View File

@ -76,6 +76,14 @@ class openstack_project::puppetmaster (
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
}
cron { 'deleteoldreports-json':
user => 'root',
hour => '3',
minute => '0',
command => 'sleep $((RANDOM\%600)) && find /var/lib/puppet/reports -name \'*.json\' -mtime +5 -execdir rm {} \;',
environment => 'PATH=/var/lib/gems/1.8/bin:/usr/bin:/bin:/usr/sbin:/sbin',
}
file { '/var/lib/puppet/reports':
ensure => directory,
owner => 'puppet',