Delete json reports when we delete yaml reports

We started collecting these things... and never stopped.

exmaple:
find /var/lib/puppet/reports/zm08.openstack.org/ -mtime +5 | wc -l
690

Change-Id: I72dc2bb32c76ae8f2ebd22801e8d3e9924c25d4d
This commit is contained in:
Spencer Krum 2016-02-10 18:55:32 -08:00
parent 007bd5768f
commit abbd0d73fb

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',