On 07/21/2011 03:14 AM, Hugo Deprez wrote:

Is there any mechanism available to auto delete old files ?
Or should I configured my own script to clean up old reports ?

I'm doing this:

class puppet::clean_reports {

        cron { "puppet clean reports":
command => 'cd /var/lib/puppet/reports && find . -type f -name \*.yaml -mtime +7 -print0 | xargs -0 -n50 /bin/rm -f',
          user => root,
          hour => 21,
          minute => 22,
          weekday => 0,
        }
}

If there's a better way I'd love to hear it.

--
vagn

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to