From 52156ca22dba8bfc48337201bf4739b9d66da838 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Fri, 3 Jan 2014 12:10:21 +0000 Subject: [PATCH] use a puppet builtin for this Signed-off-by: Stephen Gran --- modules/debian-org/files/dsa-puppet-stuff.cron | 1 - modules/debian-org/manifests/init.pp | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/debian-org/files/dsa-puppet-stuff.cron b/modules/debian-org/files/dsa-puppet-stuff.cron index d6f9fee9e..1aab5c7de 100644 --- a/modules/debian-org/files/dsa-puppet-stuff.cron +++ b/modules/debian-org/files/dsa-puppet-stuff.cron @@ -6,4 +6,3 @@ SHELL=/bin/bash @hourly root [ ! -d /var/cache/dsa ] || touch /var/cache/dsa/cron.alive 34 */4 * * * root if [ -x /usr/sbin/puppetd ]; then sleep $(( $RANDOM \% 7200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 3600"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/sbin/puppetd -o --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi -@daily root find /var/lib/puppet/clientbucket/ -type f -mtime +30 -atime +30 -exec rm {} \+ diff --git a/modules/debian-org/manifests/init.pp b/modules/debian-org/manifests/init.pp index 2afdd4f7b..3ecb9278b 100644 --- a/modules/debian-org/manifests/init.pp +++ b/modules/debian-org/manifests/init.pp @@ -264,4 +264,12 @@ class debian-org { exec { 'init q': refreshonly => true } + + tidy { '/var/lib/puppet/clientbucket/': + age => '2w', + recurse => 9, + type => ctime, + matches => [ 'paths', 'contents' ], + schedule => weekly + } } -- 2.20.1