From e117ba4a4e73e38afba5d8cacbf169e9a063fa7c Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 15 Sep 2019 15:31:35 +0200 Subject: [PATCH] dgit_{browse,git} -> hiera role; explicitly include apache2 --- hieradata/common.yaml | 4 --- hieradata/nodes/cgi-grnet-01.debian.org.yaml | 2 ++ modules/roles/manifests/dgit_browse.pp | 37 ++++++++++---------- modules/roles/manifests/dgit_git.pp | 17 ++++----- modules/roles/manifests/init.pp | 7 ---- 5 files changed, 30 insertions(+), 37 deletions(-) diff --git a/hieradata/common.yaml b/hieradata/common.yaml index c811609de..ffaafe9b7 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -48,10 +48,6 @@ roles: ftp.upload.d.o: - coccia.debian.org - usper.debian.org - dgit_browse: - - cgi-grnet-01.debian.org - dgit_git: - - cgi-grnet-01.debian.org git_master: - adayevskaya.debian.org historicalpackages: diff --git a/hieradata/nodes/cgi-grnet-01.debian.org.yaml b/hieradata/nodes/cgi-grnet-01.debian.org.yaml index 7cd1ffc1c..4fb099d2e 100644 --- a/hieradata/nodes/cgi-grnet-01.debian.org.yaml +++ b/hieradata/nodes/cgi-grnet-01.debian.org.yaml @@ -1,4 +1,6 @@ --- classes: - roles::anonscm + - roles::dgit_browse + - roles::dgit_git - roles::search_frontend diff --git a/modules/roles/manifests/dgit_browse.pp b/modules/roles/manifests/dgit_browse.pp index 72ceebd37..2db86c8ec 100644 --- a/modules/roles/manifests/dgit_browse.pp +++ b/modules/roles/manifests/dgit_browse.pp @@ -1,24 +1,25 @@ class roles::dgit_browse { - ssl::service { 'browse.dgit.debian.org': - notify => Exec['service apache2 reload'], - key => true, - } + include apache2 - package { 'cgit': ensure => installed, } - package { 'python-pygments': ensure => installed, } - package { 'python-chardet': ensure => installed, } + ssl::service { 'browse.dgit.debian.org': + notify => Exec['service apache2 reload'], + key => true, + } - file { '/etc/cgitrc': - source => 'puppet:///modules/roles/dgit/cgitrc', - } - file { '/etc/apache2/conf-enabled/cgit.conf': - ensure => absent, - notify => Exec['service apache2 reload'], - } + package { 'cgit': ensure => installed, } + package { 'python-pygments': ensure => installed, } + package { 'python-chardet': ensure => installed, } - apache2::site { '010-browse.dgit.debian.org': - site => 'browse.dgit.debian.org', - source => 'puppet:///modules/roles/dgit/browse.dgit.debian.org', - } + file { '/etc/cgitrc': + source => 'puppet:///modules/roles/dgit/cgitrc', + } + file { '/etc/apache2/conf-enabled/cgit.conf': + ensure => absent, + notify => Exec['service apache2 reload'], + } + apache2::site { '010-browse.dgit.debian.org': + site => 'browse.dgit.debian.org', + source => 'puppet:///modules/roles/dgit/browse.dgit.debian.org', + } } diff --git a/modules/roles/manifests/dgit_git.pp b/modules/roles/manifests/dgit_git.pp index 866d8cbd4..ba71748b3 100644 --- a/modules/roles/manifests/dgit_git.pp +++ b/modules/roles/manifests/dgit_git.pp @@ -1,12 +1,13 @@ class roles::dgit_git { - ssl::service { 'git.dgit.debian.org': - notify => Exec['service apache2 reload'], - key => true, - } + include apache2 - apache2::site { '010-git.dgit.debian.org': - site => 'git.dgit.debian.org', - source => 'puppet:///modules/roles/dgit/git.dgit.debian.org', - } + ssl::service { 'git.dgit.debian.org': + notify => Exec['service apache2 reload'], + key => true, + } + apache2::site { '010-git.dgit.debian.org': + site => 'git.dgit.debian.org', + source => 'puppet:///modules/roles/dgit/git.dgit.debian.org', + } } diff --git a/modules/roles/manifests/init.pp b/modules/roles/manifests/init.pp index ae90e56fd..1f5644574 100644 --- a/modules/roles/manifests/init.pp +++ b/modules/roles/manifests/init.pp @@ -154,13 +154,6 @@ class roles { } } - if has_role('dgit_browse') { - include roles::dgit_browse - } - if has_role('dgit_git') { - include roles::dgit_git - } - if $::hostname in [lw01, lw02, lw03, lw04, lw09, lw10] { include roles::snapshot } -- 2.20.1