From 9bfd3af912d4c41d971a2a0198c58607924f1b26 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 12 Sep 2019 09:19:07 +0200 Subject: [PATCH] split out onionmaster into its own role --- hieradata/nodes/dillon.debian.org.yaml | 1 + modules/roles/manifests/onion_master.pp | 19 +++++++++++++++++++ modules/roles/manifests/static_master.pp | 19 ------------------- 3 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 modules/roles/manifests/onion_master.pp diff --git a/hieradata/nodes/dillon.debian.org.yaml b/hieradata/nodes/dillon.debian.org.yaml index 9801d2266..355d91860 100644 --- a/hieradata/nodes/dillon.debian.org.yaml +++ b/hieradata/nodes/dillon.debian.org.yaml @@ -1,3 +1,4 @@ classes: - roles::dsa_wiki_buildhost - roles::static_master + - roles::onion_master diff --git a/modules/roles/manifests/onion_master.pp b/modules/roles/manifests/onion_master.pp new file mode 100644 index 000000000..5ada1e8dd --- /dev/null +++ b/modules/roles/manifests/onion_master.pp @@ -0,0 +1,19 @@ +# onion.debian.org website build +# +class roles::onion_master { + file { '/srv/puppet.debian.org': + ensure => directory + } + file { '/srv/puppet.debian.org/puppet-facts': + ensure => directory + } + concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml': + notify => Exec['rebuild-onion-website'], + } + Concat::Fragment <<| tag == 'onionbalance-services.yaml' |>> + + exec { 'rebuild-onion-website': + command => '/bin/su - staticsync -c \'make -C /srv/onion-master.debian.org\'', + refreshonly => true, + } +} diff --git a/modules/roles/manifests/static_master.pp b/modules/roles/manifests/static_master.pp index 36de4b944..6a36ed3fc 100644 --- a/modules/roles/manifests/static_master.pp +++ b/modules/roles/manifests/static_master.pp @@ -35,23 +35,4 @@ class roles::static_master { owner => 'staticsync', group => 'staticsync', } - - # export some information for the onion.debian.org build - if $::hostname in [dillon] { - file { '/srv/puppet.debian.org': - ensure => directory - } - file { '/srv/puppet.debian.org/puppet-facts': - ensure => directory - } - concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml': - notify => Exec['rebuild-onion-website'], - } - Concat::Fragment <<| tag == 'onionbalance-services.yaml' |>> - - exec { 'rebuild-onion-website': - command => '/bin/su - staticsync -c \'make -C /srv/onion-master.debian.org\'', - refreshonly => true, - } - } } -- 2.20.1