Yesterday i used a Puppet master as an example to talk about purging old files on Linux.
Of course we can setup a cron job and run the shell command daily for housekeeping. But as we are using Puppet, we don’t we do that thru Puppet manifest?
tidy { 'puppet::reports':
path => '/var/lib/puppet/reports',
matches => '*.yaml',
age => '14d',
backup => false,
recurse => true,
rmdirs => false,
type => 'ctime',
}
The above tidy type will delete those .yaml which is older than 14 days.
Done =)
Reference: Google Groups – Purge puppet’s reports
