From d2bfedd6bf81092f80c0263869fb0d4242378c62 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 15 Sep 2019 18:13:36 +0200 Subject: [PATCH] planet_{search,master} -> hiera role; explicitly include apache2 --- hieradata/common.yaml | 4 ---- hieradata/nodes/philp.debian.org.yaml | 3 +++ modules/roles/manifests/init.pp | 7 ------- modules/roles/manifests/planet_master.pp | 23 ++++++++++++----------- modules/roles/manifests/planet_search.pp | 4 ++++ 5 files changed, 19 insertions(+), 22 deletions(-) create mode 100644 modules/roles/manifests/planet_search.pp diff --git a/hieradata/common.yaml b/hieradata/common.yaml index aff2fa0c1..2b06049a6 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -185,10 +185,6 @@ roles: debug_mirror_onion: - mirror-accumu.debian.org - schmelzer.debian.org - planet_master: - - philp.debian.org - planet_search: - - philp.debian.org i18n.d.o: - tye.debian.org l10n.d.o: diff --git a/hieradata/nodes/philp.debian.org.yaml b/hieradata/nodes/philp.debian.org.yaml index 3ccff770b..a4a5beb54 100644 --- a/hieradata/nodes/philp.debian.org.yaml +++ b/hieradata/nodes/philp.debian.org.yaml @@ -1,2 +1,5 @@ +--- classes: + - roles::planet_master + - roles::planet_search - roles::static_source diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index d77859e23..450e7f604 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -117,13 +117,6 @@ class roles { include roles::snapshot_shell } - if has_role('planet_master') { - include roles::planet_master - } - if has_role('planet_search') { - ssl::service { 'planet-search.debian.org': notify => Exec['service apache2 reload'], key => true, } - } - if has_role('i18n.d.o') { ssl::service { 'i18n.debian.org': notify => Exec['service apache2 reload'], key => true, } } diff --git a/modules/roles/manifests/planet_master.pp b/modules/roles/manifests/planet_master.pp index 8e67d469c..563200570 100644 --- a/modules/roles/manifests/planet_master.pp +++ b/modules/roles/manifests/planet_master.pp @@ -1,13 +1,14 @@ class roles::planet_master { - include apache2::ssl - apache2::config { 'puppet-debianhosts': - ensure => 'absent', - } - apache2::site { 'planet-master.debian.org': - content => template('roles/planet_master/planet-master.debian.org.erb') - } - ssl::service { 'planet-master.debian.org': - notify => Exec['service apache2 reload'], - key => true, - } + include apacke2 + include apache2::ssl + apache2::config { 'puppet-debianhosts': + ensure => 'absent', + } + apache2::site { 'planet-master.debian.org': + content => template('roles/planet_master/planet-master.debian.org.erb') + } + ssl::service { 'planet-master.debian.org': + notify => Exec['service apache2 reload'], + key => true, + } } diff --git a/modules/roles/manifests/planet_search.pp b/modules/roles/manifests/planet_search.pp new file mode 100644 index 000000000..b62e5a73e --- /dev/null +++ b/modules/roles/manifests/planet_search.pp @@ -0,0 +1,4 @@ +class roles::planet_search { + include apache2 + ssl::service { 'planet-search.debian.org': notify => Exec['service apache2 reload'], key => true, } +} -- 2.20.1