turn buildd into a real role
authorPeter Palfrader <peter@palfrader.org>
Sun, 8 Sep 2019 11:08:01 +0000 (13:08 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 8 Sep 2019 11:08:01 +0000 (13:08 +0200)
49 files changed:
hieradata/nodes/antheil.debian.org.yaml
hieradata/nodes/arm-arm-01.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/arm-arm-03.debian.org.yaml
hieradata/nodes/arm-arm-04.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/arm-conova-01.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/arm-conova-02.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/arm-ubc-01.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/arm-ubc-02.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/arm-ubc-03.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/arm-ubc-04.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/arm-ubc-05.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/arm-ubc-06.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/arnold.debian.org.yaml
hieradata/nodes/eberlin.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/hartmann.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/hasse.debian.org.yaml
hieradata/nodes/henze.debian.org.yaml
hieradata/nodes/hoiby.debian.org.yaml
hieradata/nodes/mips-aql-01.debian.org.yaml
hieradata/nodes/mips-aql-02.debian.org.yaml
hieradata/nodes/mips-aql-04.debian.org.yaml
hieradata/nodes/mips-aql-05.debian.org.yaml
hieradata/nodes/mips-aql-06.debian.org.yaml
hieradata/nodes/mips-manda-01.debian.org.yaml
hieradata/nodes/mips-sil-01.debian.org.yaml
hieradata/nodes/mipsel-aql-01.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/mipsel-aql-02.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/mipsel-aql-03.debian.org.yaml
hieradata/nodes/mipsel-manda-01.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/mipsel-manda-02.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/mipsel-manda-03.debian.org.yaml
hieradata/nodes/mipsel-osuosl-01.debian.org.yaml
hieradata/nodes/mipsel-osuosl-02.debian.org.yaml
hieradata/nodes/mipsel-sil-01.debian.org.yaml
hieradata/nodes/ppc64el-osuosl-01.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/ppc64el-unicamp-01.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/x86-csail-01.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/x86-csail-02.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/x86-grnet-01.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/x86-grnet-02.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/x86-ubc-01.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/x86-ubc-02.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/zandonai.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/zani.debian.org.yaml [new file with mode: 0644]
modules/motd/templates/motd.erb
modules/puppetmaster/lib/puppet/parser/functions/nodeinfo.rb
modules/roles/manifests/buildd.pp [new file with mode: 0644]
modules/roles/manifests/init.pp
modules/samhain/templates/samhainrc.erb

diff --git a/hieradata/nodes/arm-arm-01.debian.org.yaml b/hieradata/nodes/arm-arm-01.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/arm-arm-04.debian.org.yaml b/hieradata/nodes/arm-arm-04.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/arm-conova-01.debian.org.yaml b/hieradata/nodes/arm-conova-01.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/arm-conova-02.debian.org.yaml b/hieradata/nodes/arm-conova-02.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/arm-ubc-01.debian.org.yaml b/hieradata/nodes/arm-ubc-01.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/arm-ubc-02.debian.org.yaml b/hieradata/nodes/arm-ubc-02.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/arm-ubc-03.debian.org.yaml b/hieradata/nodes/arm-ubc-03.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/arm-ubc-04.debian.org.yaml b/hieradata/nodes/arm-ubc-04.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/arm-ubc-05.debian.org.yaml b/hieradata/nodes/arm-ubc-05.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/arm-ubc-06.debian.org.yaml b/hieradata/nodes/arm-ubc-06.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
index 14ec4d2..7a59c41 100644 (file)
@@ -1,2 +1,3 @@
 classes:
   - roles::broken_rtc
+  - roles::buildd
diff --git a/hieradata/nodes/eberlin.debian.org.yaml b/hieradata/nodes/eberlin.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/hartmann.debian.org.yaml b/hieradata/nodes/hartmann.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
index 14ec4d2..7a59c41 100644 (file)
@@ -1,2 +1,3 @@
 classes:
   - roles::broken_rtc
+  - roles::buildd
index 14ec4d2..7a59c41 100644 (file)
@@ -1,2 +1,3 @@
 classes:
   - roles::broken_rtc
+  - roles::buildd
index 14ec4d2..7a59c41 100644 (file)
@@ -1,2 +1,3 @@
 classes:
   - roles::broken_rtc
+  - roles::buildd
diff --git a/hieradata/nodes/mipsel-aql-01.debian.org.yaml b/hieradata/nodes/mipsel-aql-01.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/mipsel-aql-02.debian.org.yaml b/hieradata/nodes/mipsel-aql-02.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/mipsel-manda-01.debian.org.yaml b/hieradata/nodes/mipsel-manda-01.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/mipsel-manda-02.debian.org.yaml b/hieradata/nodes/mipsel-manda-02.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/ppc64el-osuosl-01.debian.org.yaml b/hieradata/nodes/ppc64el-osuosl-01.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/ppc64el-unicamp-01.debian.org.yaml b/hieradata/nodes/ppc64el-unicamp-01.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/x86-csail-01.debian.org.yaml b/hieradata/nodes/x86-csail-01.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/x86-csail-02.debian.org.yaml b/hieradata/nodes/x86-csail-02.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/x86-grnet-01.debian.org.yaml b/hieradata/nodes/x86-grnet-01.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/x86-grnet-02.debian.org.yaml b/hieradata/nodes/x86-grnet-02.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/x86-ubc-01.debian.org.yaml b/hieradata/nodes/x86-ubc-01.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/x86-ubc-02.debian.org.yaml b/hieradata/nodes/x86-ubc-02.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/zandonai.debian.org.yaml b/hieradata/nodes/zandonai.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
diff --git a/hieradata/nodes/zani.debian.org.yaml b/hieradata/nodes/zani.debian.org.yaml
new file mode 100644 (file)
index 0000000..a823a0a
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::buildd
index 4fb8971..7e6446e 100644 (file)
@@ -47,8 +47,9 @@ if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose'))
   p = scope.lookupvar('site::nodeinfo')['ldap']['purpose'].clone()
   entries = ""
 
-  if p.delete('buildd')
+  if classes.include?("roles::buildd")
     entries += ", the Debian #{arch} build daemon"
+    p.delete('buildd')
   end
   if classes.include?("roles::porterbox")
     entries += ", the Debian #{arch} porterbox"
index c7af8ae..31ba385 100644 (file)
@@ -11,7 +11,6 @@ module Puppet::Parser::Functions
         raise Puppet::ParseError, "Host #{host} does not have ipHostNumber values in ldap"
       end
       nodeinfo['hoster'] = function_whohosts([nodeinfo['ldap']['ipHostNumber']])
-      nodeinfo['buildd'] = (nodeinfo['ldap']['purpose'].respond_to?('include?') && nodeinfo['ldap']['purpose'].include?('buildd'))
       nodeinfo['timeserver'] = (nodeinfo['ldap']['purpose'].respond_to?('include?') && nodeinfo['ldap']['purpose'].include?('timeserver'))
       nodeinfo['ganeti'] = (nodeinfo['ldap']['purpose'].respond_to?('include?') && nodeinfo['ldap']['purpose'].include?('ganeti/kvm host'))
 
diff --git a/modules/roles/manifests/buildd.pp b/modules/roles/manifests/buildd.pp
new file mode 100644 (file)
index 0000000..4754d63
--- /dev/null
@@ -0,0 +1,5 @@
+# debian.org buildd
+class roles::buildd {
+  include buildd
+  include bacula::not_a_client
+}
index 87cf8e2..b49b6bd 100644 (file)
@@ -19,11 +19,6 @@ class roles {
                include nagios::server
        }
 
-       # XXX: turn this into a real role
-       if getfromhash($site::nodeinfo, 'buildd') {
-               include buildd
-       }
-
        if has_role('bugs_mirror') {
                include roles::bugs_mirror
        }
index 0faf5ec..e72f5d4 100644 (file)
@@ -266,7 +266,7 @@ dir=-1/srv
 ## This file might be created or removed by the system sometimes.
 ##
 file=/etc/resolv.conf
-<% if scope.lookupvar('site::nodeinfo')['buildd'] -%>
+<% if classes.include?('roles::buildd') -%>
 file=/etc/dupload.conf
 file=/etc/buildd/buildd.conf
 file=/etc/sbuild/sbuild.conf