Delete old logs on hosts using pybuildd
authorJulien Cristau <jcristau@debian.org>
Wed, 28 Nov 2018 08:33:53 +0000 (09:33 +0100)
committerJulien Cristau <jcristau@debian.org>
Wed, 28 Nov 2018 08:33:53 +0000 (09:33 +0100)
pybuildd keeps them indefinitely
(https://salsa.debian.org/wb-team/pybuildd/issues/11) so clean up ourselves to
avoid running into ENOSPC.

modules/buildd/manifests/init.pp

index a54f548..cf7f2a0 100644 (file)
@@ -149,6 +149,13 @@ class buildd ($ensure=present) {
                                group   => buildd,
                                owner   => buildd,
                        }
                                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
                } else {
                        #
                        # buildd configuration