From 6311cac335d7e53e7fffb5972c8b5efb25568af1 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 11 Sep 2019 10:45:15 +0200 Subject: [PATCH] include static_master class using hiera --- hieradata/common.yaml | 6 ------ hieradata/nodes/dillon.debian.org.yaml | 1 + hieradata/nodes/fasolo.debian.org.yaml | 3 ++- hieradata/nodes/manziarly.debian.org.yaml | 2 ++ hieradata/nodes/porta.debian.org.yaml | 2 ++ hieradata/nodes/static-master-grnet-01.debian.org.yaml | 2 ++ modules/roles/manifests/init.pp | 4 ---- modules/samhain/templates/samhainrc.erb | 2 +- modules/tcp_bbr/manifests/init.pp | 2 +- 9 files changed, 11 insertions(+), 13 deletions(-) create mode 100644 hieradata/nodes/manziarly.debian.org.yaml create mode 100644 hieradata/nodes/porta.debian.org.yaml create mode 100644 hieradata/nodes/static-master-grnet-01.debian.org.yaml diff --git a/hieradata/common.yaml b/hieradata/common.yaml index d70181085..5bcf861fd 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -176,12 +176,6 @@ roles: - ticharich.debian.org - wilder.debian.org - wuiet.debian.org - static_master: - - dillon.debian.org - - fasolo.debian.org - - manziarly.debian.org - - porta.debian.org - - static-master-grnet-01.debian.org static_mirror: - klecker.debian.org - mirror-anu.debian.org diff --git a/hieradata/nodes/dillon.debian.org.yaml b/hieradata/nodes/dillon.debian.org.yaml index 830ac9db5..9801d2266 100644 --- a/hieradata/nodes/dillon.debian.org.yaml +++ b/hieradata/nodes/dillon.debian.org.yaml @@ -1,2 +1,3 @@ classes: - roles::dsa_wiki_buildhost + - roles::static_master diff --git a/hieradata/nodes/fasolo.debian.org.yaml b/hieradata/nodes/fasolo.debian.org.yaml index ebfdc3e15..63ec7b286 100644 --- a/hieradata/nodes/fasolo.debian.org.yaml +++ b/hieradata/nodes/fasolo.debian.org.yaml @@ -1,2 +1,3 @@ classes: - - profile::ipsec::fasolo_storace + - profile::ipsec::fasolo_storace + - roles::static_master diff --git a/hieradata/nodes/manziarly.debian.org.yaml b/hieradata/nodes/manziarly.debian.org.yaml new file mode 100644 index 000000000..e8342a055 --- /dev/null +++ b/hieradata/nodes/manziarly.debian.org.yaml @@ -0,0 +1,2 @@ +classes: + - roles::static_master diff --git a/hieradata/nodes/porta.debian.org.yaml b/hieradata/nodes/porta.debian.org.yaml new file mode 100644 index 000000000..e8342a055 --- /dev/null +++ b/hieradata/nodes/porta.debian.org.yaml @@ -0,0 +1,2 @@ +classes: + - roles::static_master diff --git a/hieradata/nodes/static-master-grnet-01.debian.org.yaml b/hieradata/nodes/static-master-grnet-01.debian.org.yaml new file mode 100644 index 000000000..e8342a055 --- /dev/null +++ b/hieradata/nodes/static-master-grnet-01.debian.org.yaml @@ -0,0 +1,2 @@ +classes: + - roles::static_master diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index 3960f1ed3..dc1dee0c1 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -116,10 +116,6 @@ class roles { include roles::syncproxy } - if has_role('static_master') { - include roles::static_master - } - if has_role('static_mirror') { include roles::static_mirror } elsif has_role('static_source') { diff --git a/modules/samhain/templates/samhainrc.erb b/modules/samhain/templates/samhainrc.erb index e72f5d4a4..f6829e690 100644 --- a/modules/samhain/templates/samhainrc.erb +++ b/modules/samhain/templates/samhainrc.erb @@ -185,7 +185,7 @@ 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 scope.function_has_role(['static_master']) -%> +<% if scope.function_has_role(['static_mirror']) or scope.function_has_role(['static_source']) or classes.include?("roles::static_master") -%> file=/etc/ssh/userkeys file=/etc/ssh/userkeys/staticsync <% end -%> diff --git a/modules/tcp_bbr/manifests/init.pp b/modules/tcp_bbr/manifests/init.pp index ab35b3554..90b0e5372 100644 --- a/modules/tcp_bbr/manifests/init.pp +++ b/modules/tcp_bbr/manifests/init.pp @@ -24,7 +24,7 @@ class tcp_bbr { has_role('security_mirror') or has_role('security_upload') or has_role('ssh.upload.d.o') or - has_role('static_master') or + defined(Class["roles::static_master"]) or has_role('static_mirror') or has_role('static_source') or has_role('syncproxy') or -- 2.20.1