From: Julien Cristau Date: Wed, 28 Nov 2018 08:33:53 +0000 (+0100) Subject: Delete old logs on hosts using pybuildd X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=51f6c03cffa20d81ed0070f10f692b8450cc2ca2;p=mirror%2Fdsa-puppet.git Delete old logs on hosts using pybuildd pybuildd keeps them indefinitely (https://salsa.debian.org/wb-team/pybuildd/issues/11) so clean up ourselves to avoid running into ENOSPC. --- diff --git a/modules/buildd/manifests/init.pp b/modules/buildd/manifests/init.pp index a54f54863..cf7f2a0f2 100644 --- a/modules/buildd/manifests/init.pp +++ b/modules/buildd/manifests/init.pp @@ -149,6 +149,13 @@ class buildd ($ensure=present) { group => buildd, owner => buildd, } + # work around https://salsa.debian.org/wb-team/pybuildd/issues/11 + concat::fragment { 'dsa-puppet-stuff--pybuildd-expire-logs': + target => '/etc/cron.d/dsa-puppet-stuff', + content => @(EOF) + @daily buildd [ -d ~buildd/logs ] && find ~buildd/logs -type f -mtime +90 -delete + | EOF + } } else { # # buildd configuration