Add x86-grnet-02.debian.org
[mirror/dsa-puppet.git] / modules / buildd / manifests / init.pp
index 33867d0..e48e0ff 100644 (file)
@@ -101,27 +101,12 @@ class buildd ($ensure=present) {
                #
                # buildd/pybuildd configuration
                #
-               if $::hostname in [x86-bm-01,x86-grnet-01,zani] {
+               if $::hostname in [x86-bm-01,x86-grnet-01,x86-grnet-02,zani] {
                        #
                        # pybuildd configuration
                        #
-
-                       # We still rely on buildd for some features. Install the package
-                       # but keep it disabled.
                        package { 'buildd':
-                               ensure => installed,
-                       }
-                       service { 'buildd':
-                               enable => false,
-                               ensure => 'stopped',
-                       }
-                       file { '/home/buildd/NO-DAEMON-PLEASE':
-                               ensure => present,
-                       }
-                       file { '/home/buildd/.forward':
-                               content  => "|/usr/bin/buildd-mail\n",
-                               group   => buildd,
-                               owner   => buildd,
+                               ensure => purged,
                        }
 
                        package { ['python3-retrying', 'python3-yaml']:
@@ -153,7 +138,23 @@ class buildd ($ensure=present) {
                                mode    => '755',
                        }
                        file { '/etc/systemd/journald.conf.d/persistency.conf':
-                               source => 'puppet:///modules/systemd/persistency.conf',
+                               source => 'puppet:///modules/dsa_systemd/persistency.conf',
+                       }
+
+                       # Make sure that the build directory have the correct permissions.
+                       # This should go away once pybuildd issue #3 is solved.
+                       file { '/home/buildd/build':
+                               ensure  => directory,
+                               mode    => '2750',
+                               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 {
                        #
@@ -223,6 +224,9 @@ class buildd ($ensure=present) {
                                        ensure => absent,
                                }
                        } else {
+                               package { 'apt-transport-https':
+                                       ensure => installed,
+                               }
                                site::aptrepo { 'buildd.debian.org':
                                        key        => 'puppet:///modules/buildd/buildd.debian.org.gpg',
                                        url        => 'https://apt.buildd.debian.org/',