switch the statis hosts to hiera roles
authorPeter Palfrader <peter@palfrader.org>
Sat, 14 Sep 2019 14:49:34 +0000 (16:49 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 14 Sep 2019 14:49:34 +0000 (16:49 +0200)
26 files changed:
hieradata/common.yaml
hieradata/nodes/boott.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/casulana.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/coccia.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/dillon.debian.org.yaml
hieradata/nodes/donizetti.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/fasolo.debian.org.yaml
hieradata/nodes/kaufmann.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/klecker.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/lindsay.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/manziarly.debian.org.yaml
hieradata/nodes/mekeel.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/melartin.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/mirror-anu.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/mirror-csail.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/mirror-isc.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/philp.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/porta.debian.org.yaml
hieradata/nodes/respighi.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/santoro.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/senfter.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/wolkenstein.debian.org.yaml [new file with mode: 0644]
hieradata/nodes/wuiet.debian.org.yaml
modules/roles/manifests/init.pp
modules/samhain/templates/samhainrc.erb
modules/tcp_bbr/manifests/init.pp

index e18cf68..4a7d849 100644 (file)
@@ -179,37 +179,10 @@ roles:
     - ticharich.debian.org
     - wilder.debian.org
     - wuiet.debian.org
-  static_mirror:
-    - klecker.debian.org
-    - mirror-anu.debian.org
-    - mirror-csail.debian.org
-    - mirror-isc.debian.org
-    - senfter.debian.org
-    - santoro.debian.org
   static_mirror_onion:
     - klecker.debian.org
     - mirror-isc.debian.org
     - senfter.debian.org
-  # when adding a new static mirror, allow it to sync etc, but do not push to it and wait for it.  For this, also add it to static_mirror_nopush.
-  static_mirror_nopush:
-    - dummy
-  static_source:
-    - boott.debian.org
-    - casulana.debian.org
-    - coccia.debian.org
-    - dillon.debian.org
-    - donizetti.debian.org
-    - fasolo.debian.org
-    - kaufmann.debian.org
-    - lindsay.debian.org
-    - manziarly.debian.org
-    - mekeel.debian.org
-    - melartin.debian.org
-    - porta.debian.org
-    - philp.debian.org
-    - respighi.debian.org
-    - wolkenstein.debian.org
-    - wuiet.debian.org
   syncproxy:
     - gretchaninov.debian.org
     - klecker.debian.org
diff --git a/hieradata/nodes/boott.debian.org.yaml b/hieradata/nodes/boott.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
diff --git a/hieradata/nodes/casulana.debian.org.yaml b/hieradata/nodes/casulana.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
diff --git a/hieradata/nodes/coccia.debian.org.yaml b/hieradata/nodes/coccia.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
index 355d918..776cd32 100644 (file)
@@ -1,4 +1,5 @@
 classes:
   - roles::dsa_wiki_buildhost
   - roles::static_master
+  - roles::static_source
   - roles::onion_master
diff --git a/hieradata/nodes/donizetti.debian.org.yaml b/hieradata/nodes/donizetti.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
index 63ec7b2..73516dd 100644 (file)
@@ -1,3 +1,4 @@
 classes:
   - profile::ipsec::fasolo_storace
   - roles::static_master
+  - roles::static_source
diff --git a/hieradata/nodes/kaufmann.debian.org.yaml b/hieradata/nodes/kaufmann.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
diff --git a/hieradata/nodes/klecker.debian.org.yaml b/hieradata/nodes/klecker.debian.org.yaml
new file mode 100644 (file)
index 0000000..1a18dd4
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_mirror_web
diff --git a/hieradata/nodes/lindsay.debian.org.yaml b/hieradata/nodes/lindsay.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
index e8342a0..f044c03 100644 (file)
@@ -1,2 +1,3 @@
 classes:
   - roles::static_master
+  - roles::static_source
diff --git a/hieradata/nodes/mekeel.debian.org.yaml b/hieradata/nodes/mekeel.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
diff --git a/hieradata/nodes/melartin.debian.org.yaml b/hieradata/nodes/melartin.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
diff --git a/hieradata/nodes/mirror-anu.debian.org.yaml b/hieradata/nodes/mirror-anu.debian.org.yaml
new file mode 100644 (file)
index 0000000..1a18dd4
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_mirror_web
diff --git a/hieradata/nodes/mirror-csail.debian.org.yaml b/hieradata/nodes/mirror-csail.debian.org.yaml
new file mode 100644 (file)
index 0000000..1a18dd4
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_mirror_web
diff --git a/hieradata/nodes/mirror-isc.debian.org.yaml b/hieradata/nodes/mirror-isc.debian.org.yaml
new file mode 100644 (file)
index 0000000..1a18dd4
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_mirror_web
diff --git a/hieradata/nodes/philp.debian.org.yaml b/hieradata/nodes/philp.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
index e8342a0..f044c03 100644 (file)
@@ -1,2 +1,3 @@
 classes:
   - roles::static_master
+  - roles::static_source
diff --git a/hieradata/nodes/respighi.debian.org.yaml b/hieradata/nodes/respighi.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
diff --git a/hieradata/nodes/santoro.debian.org.yaml b/hieradata/nodes/santoro.debian.org.yaml
new file mode 100644 (file)
index 0000000..1a18dd4
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_mirror_web
diff --git a/hieradata/nodes/senfter.debian.org.yaml b/hieradata/nodes/senfter.debian.org.yaml
new file mode 100644 (file)
index 0000000..1a18dd4
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_mirror_web
diff --git a/hieradata/nodes/wolkenstein.debian.org.yaml b/hieradata/nodes/wolkenstein.debian.org.yaml
new file mode 100644 (file)
index 0000000..3ccff77
--- /dev/null
@@ -0,0 +1,2 @@
+classes:
+  - roles::static_source
index e601295..b7a97dd 100644 (file)
@@ -1,2 +1,3 @@
 classes:
   - roles::buildd_master
+  - roles::static_source
index dd8e569..e8320d4 100644 (file)
@@ -116,12 +116,6 @@ class roles {
                include roles::syncproxy
        }
 
-       if has_role('static_mirror') {
-               include roles::static_mirror_web
-       } elsif has_role('static_source') {
-               include roles::static_source
-       }
-
        if has_role('weblog_provider') {
                include roles::weblog_provider
        }
index 9bc3019..262c71a 100644 (file)
@@ -103,13 +103,10 @@ file=/etc/bind/geodns/recvconf.files
 file=/etc/bind/named.conf.options
 <% end -%>
 file=/etc/apache2/conf.d/puppet-builddlist
-<% if classes.include?("roles::static_mirror") -%>
+<% if classes.include?("roles::static_mirror_web") -%>
 file=/etc/apache2/sites-available/static-vhosts-simple
-file=/etc/static-clients.conf
 <% elsif classes.include?("staticsync::static_master") -%>
 file=/etc/static-clients.conf
-<% elsif classes.include?("roles::static_source") -%>
-file=/etc/static-clients.conf
 <% end -%>
 <% if classes.include?("apache2") -%>
 file=/etc/apache2/conf-available/puppet-ssl-key-pins.conf
@@ -185,10 +182,6 @@ file=/etc/rc.local
 file=/etc/unbound
 file=/etc/dsa
 file=/etc/rabbitmq
-<% if scope.function_has_role(['static_mirror']) or scope.function_has_role(['static_source']) or classes.include?("staticsync::static_master")  -%>
-file=/etc/ssh/userkeys
-file=/etc/ssh/userkeys/staticsync
-<% end -%>
 <% if scope.function_has_role(['ssh.upload.d.o']) -%>
 file=/etc/ssh/userkeys/buildd-uploader
 <% end -%>
index a7ae478..22ee676 100644 (file)
@@ -25,8 +25,8 @@ class tcp_bbr {
                   has_role('security_upload') or
                   has_role('ssh.upload.d.o') or
                   defined(Class["staticync::static_master"]) or
-                  has_role('static_mirror') or
-                  has_role('static_source') or
+                  defined(Class["staticync::static_mirror"]) or
+                  defined(Class["staticync::static_source"]) or
                   has_role('syncproxy') or
                   has_role('www_master') or
                   false {