From 46be0972475f02f51cfda7c1acc0d775faef9efa Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 14 Sep 2019 16:49:34 +0200 Subject: [PATCH] switch the statis hosts to hiera roles --- hieradata/common.yaml | 27 -------------------- hieradata/nodes/boott.debian.org.yaml | 2 ++ hieradata/nodes/casulana.debian.org.yaml | 2 ++ hieradata/nodes/coccia.debian.org.yaml | 2 ++ hieradata/nodes/dillon.debian.org.yaml | 1 + hieradata/nodes/donizetti.debian.org.yaml | 2 ++ hieradata/nodes/fasolo.debian.org.yaml | 1 + hieradata/nodes/kaufmann.debian.org.yaml | 2 ++ hieradata/nodes/klecker.debian.org.yaml | 2 ++ hieradata/nodes/lindsay.debian.org.yaml | 2 ++ hieradata/nodes/manziarly.debian.org.yaml | 1 + hieradata/nodes/mekeel.debian.org.yaml | 2 ++ hieradata/nodes/melartin.debian.org.yaml | 2 ++ hieradata/nodes/mirror-anu.debian.org.yaml | 2 ++ hieradata/nodes/mirror-csail.debian.org.yaml | 2 ++ hieradata/nodes/mirror-isc.debian.org.yaml | 2 ++ hieradata/nodes/philp.debian.org.yaml | 2 ++ hieradata/nodes/porta.debian.org.yaml | 1 + hieradata/nodes/respighi.debian.org.yaml | 2 ++ hieradata/nodes/santoro.debian.org.yaml | 2 ++ hieradata/nodes/senfter.debian.org.yaml | 2 ++ hieradata/nodes/wolkenstein.debian.org.yaml | 2 ++ hieradata/nodes/wuiet.debian.org.yaml | 1 + modules/roles/manifests/init.pp | 6 ----- modules/samhain/templates/samhainrc.erb | 9 +------ modules/tcp_bbr/manifests/init.pp | 4 +-- 26 files changed, 42 insertions(+), 43 deletions(-) create mode 100644 hieradata/nodes/boott.debian.org.yaml create mode 100644 hieradata/nodes/casulana.debian.org.yaml create mode 100644 hieradata/nodes/coccia.debian.org.yaml create mode 100644 hieradata/nodes/donizetti.debian.org.yaml create mode 100644 hieradata/nodes/kaufmann.debian.org.yaml create mode 100644 hieradata/nodes/klecker.debian.org.yaml create mode 100644 hieradata/nodes/lindsay.debian.org.yaml create mode 100644 hieradata/nodes/mekeel.debian.org.yaml create mode 100644 hieradata/nodes/melartin.debian.org.yaml create mode 100644 hieradata/nodes/mirror-anu.debian.org.yaml create mode 100644 hieradata/nodes/mirror-csail.debian.org.yaml create mode 100644 hieradata/nodes/mirror-isc.debian.org.yaml create mode 100644 hieradata/nodes/philp.debian.org.yaml create mode 100644 hieradata/nodes/respighi.debian.org.yaml create mode 100644 hieradata/nodes/santoro.debian.org.yaml create mode 100644 hieradata/nodes/senfter.debian.org.yaml create mode 100644 hieradata/nodes/wolkenstein.debian.org.yaml diff --git a/hieradata/common.yaml b/hieradata/common.yaml index e18cf6899..4a7d849e7 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/boott.debian.org.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/casulana.debian.org.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/coccia.debian.org.yaml @@ -0,0 +1,2 @@ +classes: + - roles::static_source diff --git a/hieradata/nodes/dillon.debian.org.yaml b/hieradata/nodes/dillon.debian.org.yaml index 355d91860..776cd3211 100644 --- a/hieradata/nodes/dillon.debian.org.yaml +++ b/hieradata/nodes/dillon.debian.org.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/donizetti.debian.org.yaml @@ -0,0 +1,2 @@ +classes: + - roles::static_source diff --git a/hieradata/nodes/fasolo.debian.org.yaml b/hieradata/nodes/fasolo.debian.org.yaml index 63ec7b286..73516ddba 100644 --- a/hieradata/nodes/fasolo.debian.org.yaml +++ b/hieradata/nodes/fasolo.debian.org.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/kaufmann.debian.org.yaml @@ -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 index 000000000..1a18dd42a --- /dev/null +++ b/hieradata/nodes/klecker.debian.org.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/lindsay.debian.org.yaml @@ -0,0 +1,2 @@ +classes: + - roles::static_source diff --git a/hieradata/nodes/manziarly.debian.org.yaml b/hieradata/nodes/manziarly.debian.org.yaml index e8342a055..f044c0359 100644 --- a/hieradata/nodes/manziarly.debian.org.yaml +++ b/hieradata/nodes/manziarly.debian.org.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/mekeel.debian.org.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/melartin.debian.org.yaml @@ -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 index 000000000..1a18dd42a --- /dev/null +++ b/hieradata/nodes/mirror-anu.debian.org.yaml @@ -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 index 000000000..1a18dd42a --- /dev/null +++ b/hieradata/nodes/mirror-csail.debian.org.yaml @@ -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 index 000000000..1a18dd42a --- /dev/null +++ b/hieradata/nodes/mirror-isc.debian.org.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/philp.debian.org.yaml @@ -0,0 +1,2 @@ +classes: + - roles::static_source diff --git a/hieradata/nodes/porta.debian.org.yaml b/hieradata/nodes/porta.debian.org.yaml index e8342a055..f044c0359 100644 --- a/hieradata/nodes/porta.debian.org.yaml +++ b/hieradata/nodes/porta.debian.org.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/respighi.debian.org.yaml @@ -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 index 000000000..1a18dd42a --- /dev/null +++ b/hieradata/nodes/santoro.debian.org.yaml @@ -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 index 000000000..1a18dd42a --- /dev/null +++ b/hieradata/nodes/senfter.debian.org.yaml @@ -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 index 000000000..3ccff770b --- /dev/null +++ b/hieradata/nodes/wolkenstein.debian.org.yaml @@ -0,0 +1,2 @@ +classes: + - roles::static_source diff --git a/hieradata/nodes/wuiet.debian.org.yaml b/hieradata/nodes/wuiet.debian.org.yaml index e601295f7..b7a97dd54 100644 --- a/hieradata/nodes/wuiet.debian.org.yaml +++ b/hieradata/nodes/wuiet.debian.org.yaml @@ -1,2 +1,3 @@ classes: - roles::buildd_master + - roles::static_source diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index dd8e56930..e8320d4d4 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -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 } diff --git a/modules/samhain/templates/samhainrc.erb b/modules/samhain/templates/samhainrc.erb index 9bc3019d2..262c71a35 100644 --- a/modules/samhain/templates/samhainrc.erb +++ b/modules/samhain/templates/samhainrc.erb @@ -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 -%> diff --git a/modules/tcp_bbr/manifests/init.pp b/modules/tcp_bbr/manifests/init.pp index a7ae47803..22ee67628 100644 --- a/modules/tcp_bbr/manifests/init.pp +++ b/modules/tcp_bbr/manifests/init.pp @@ -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 { -- 2.20.1