-
Notifications
You must be signed in to change notification settings - Fork 20
Clean puppet reports #158
base: master
Are you sure you want to change the base?
Clean puppet reports #158
Conversation
cron { 'clean-puppet-reports': | ||
ensure => present, | ||
command => "find $(awk -F= '/^reportdir/ { print $2 }' /etc/puppet/puppet.conf) -type f -iname \*.yaml -ctime +30 -delete", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this directory be defaulted to /var/lib/puppet/reports
somehow? The QA pupper server doesn't seem to configure a reportdir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started there, but in production the reports are in /data/puppet/reports, hence the awk. I didn't check qa.
Honestly this is such a minor thing that I should just add the reportdir config into qa's puppet.conf.
I only noticed this issue 'cos puppet in staging is almost out of space, mostly these reports :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would need to add reportdir to puppmaster provision script too.
Back to @davidoae for follow-up |
Just a caution that we do in fact have a cronjob on the production puppet master that does this:
However it's not managed by puppet, but it should. So be sure to remove the unmanaged one when deploying. Thanks for moving this forward! |
Thanks dude, I completely missed that one heh. On 4 June 2015 at 12:49, Branden Visser [email protected] wrote:
|
I have added the change to provision script. |
We're keeping puppet run logs for ever and they use space and we don't need them so this sets a cronjob to remove puppet reports older than 30 days.