From 97ba21fd4934fd10d98cf6abd1b7810a8447ba23 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 15 Sep 2019 17:17:11 +0200 Subject: [PATCH] www_master -> hiera role; explicitly include apache2 --- hieradata/common.yaml | 2 -- hieradata/nodes/wolkenstein.debian.org.yaml | 1 + modules/roles/manifests/init.pp | 4 --- modules/roles/manifests/www_master.pp | 36 +++++++++++---------- 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/hieradata/common.yaml b/hieradata/common.yaml index c63ec9a86..b805539ac 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -142,8 +142,6 @@ roles: - ullmann.debian.org wiki: - wilder.debian.org - www_master: - - wolkenstein.debian.org postgres_backup_server: - backuphost.debian.org - storace.debian.org diff --git a/hieradata/nodes/wolkenstein.debian.org.yaml b/hieradata/nodes/wolkenstein.debian.org.yaml index 1ecdf5053..c7b436929 100644 --- a/hieradata/nodes/wolkenstein.debian.org.yaml +++ b/hieradata/nodes/wolkenstein.debian.org.yaml @@ -4,3 +4,4 @@ classes: - roles::static_source - roles::weblog_destination - roles::www_cgi + - roles::www_master diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index 83ddc6c30..0ce9337a0 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -52,10 +52,6 @@ class roles { include roles::git_master } - if has_role('www_master') { - include roles::www_master - } - if has_role('wiki') { include roles::wiki } diff --git a/modules/roles/manifests/www_master.pp b/modules/roles/manifests/www_master.pp index cce033870..737c1979e 100644 --- a/modules/roles/manifests/www_master.pp +++ b/modules/roles/manifests/www_master.pp @@ -1,21 +1,23 @@ class roles::www_master { - ssl::service { 'www-master.debian.org': - notify => Exec['service apache2 reload'], - key => true, - } + include apache2 - $vhost_listen = '*:80' - $vhost_listen_443 = '*:443' - $redirect_vhosts = false - $wwwdo_server_name = 'www-staging.debian.org' - $wwwdo_document_root = '/srv/www.debian.org/www' - apache2::site { '005-www-staging.debian.org': - site => 'www-staging.debian.org', - content => template('roles/apache-www.debian.org.erb'), - } + ssl::service { 'www-master.debian.org': + notify => Exec['service apache2 reload'], + key => true, + } - ssl::service { 'www-staging.debian.org' : - notify => Exec['service apache2 reload'], - key => true, - } + $vhost_listen = '*:80' + $vhost_listen_443 = '*:443' + $redirect_vhosts = false + $wwwdo_server_name = 'www-staging.debian.org' + $wwwdo_document_root = '/srv/www.debian.org/www' + apache2::site { '005-www-staging.debian.org': + site => 'www-staging.debian.org', + content => template('roles/apache-www.debian.org.erb'), + } + + ssl::service { 'www-staging.debian.org' : + notify => Exec['service apache2 reload'], + key => true, + } } -- 2.20.1