X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fstatic_mirror_web.pp;h=53ca839f86fedbc46c49673d9f19cacc1866a9c7;hb=3324b4ae702172197fe7ad725a36f052f1e67c71;hp=8c04475b8f95747b1bd26f8d7000a5616d8cf2db;hpb=bc0932e7d274b8c9466bb5346bf8746010792d33;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/static_mirror_web.pp b/modules/roles/manifests/static_mirror_web.pp index 8c04475b8..53ca839f8 100644 --- a/modules/roles/manifests/static_mirror_web.pp +++ b/modules/roles/manifests/static_mirror_web.pp @@ -38,39 +38,39 @@ class roles::static_mirror_web( } apache2::site { '010-planet.debian.org': - site => 'planet.debian.org', ensure => has_static_component('planet.debian.org') ? { true => 'present', false => 'absent' }, + site => 'planet.debian.org', content => template('roles/static-mirroring/vhost/planet.debian.org.erb'), } apache2::site { '010-lintian.debian.org': - site => 'lintian.debian.org', - ensure => absent, + ensure => absent, + site => 'lintian.debian.org', } apache2::site { '010-static-vhosts-00-manpages': - site => 'static-manpages.debian.org', ensure => has_static_component('manpages.debian.org') ? { true => 'present', false => 'absent' }, + site => 'static-manpages.debian.org', content => template('roles/static-mirroring/vhost/manpages.debian.org.erb'), } apache2::site { '010-static-vhosts-simple': - site => 'static-vhosts-simple', + site => 'static-vhosts-simple', content => template('roles/static-mirroring/vhost/static-vhosts-simple.erb'), } $wwwdo_server_name = 'www.debian.org' $wwwdo_document_root = '/srv/static.debian.org/mirrors/www.debian.org/cur' apache2::site { '005-www.debian.org': - site => 'www.debian.org', ensure => has_static_component('www.debian.org') ? { true => 'present', false => 'absent' }, + site => 'www.debian.org', content => template('roles/apache-www.debian.org.erb'), } ssl::service { 'www.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } ssl::service { 'debian.org' : - ensure => has_static_component('www.debian.org') ? { true => 'present', false => 'absent' }, - notify => Exec['service apache2 reload'], - key => true, + ensure => has_static_component('www.debian.org') ? { true => 'present', false => 'absent' }, + notify => Exec['service apache2 reload'], + key => true, } # do @@ -90,8 +90,8 @@ class roles::static_mirror_web( ssl::service { 'manpages.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } ssl::service { 'metadata-backend.ftp-master.debian.org': ensure => has_static_component('metadata.ftp-master.debian.org') ? { true => 'present', false => 'absent' }, - notify => Exec['service apache2 reload'], - key => true, + notify => Exec['service apache2 reload'], + key => true, } ssl::service { 'mirror-master.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } ssl::service { 'onion.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } @@ -125,7 +125,6 @@ class roles::static_mirror_web( ssl::service { 'debconf16.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } ssl::service { 'debconf17.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } ssl::service { 'debconf18.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } - ssl::service { 'debconf19.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } ssl::service { 'debconf2.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } ssl::service { 'debconf3.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } ssl::service { 'debconf4.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, } @@ -142,7 +141,10 @@ class roles::static_mirror_web( if $onion_service { - $onion_addr = filter_ipv4($listen_addr)[0] + $onion_addr = empty($listen_addr) ? { + true => $base::public_address, + default => filter_ipv4($listen_addr)[0] + } if ! $onion_addr { fail("Do not have a useable address for the onionservice on ${::hostname}. Is \$listen_addr empty or does it not have an IPv4 address?.") } @@ -170,7 +172,7 @@ class roles::static_mirror_web( onion::service { 'security-team.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr } onion::service { 'www.ports.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr } # dn - onion::service { 'bootstrap.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr } + onion::service { 'bootstrap.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr } onion::service { 'debaday.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr } onion::service { 'debdeltas.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr } onion::service { 'micronews.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr } @@ -202,11 +204,11 @@ class roles::static_mirror_web( file { '/srv/static.debian.org/puppet': ensure => directory, - mode => '02755' + mode => '2755' } file { '/srv/static.debian.org/puppet/disabled-service': ensure => directory, - mode => '02755' + mode => '2755' } file { '/srv/static.debian.org/puppet/disabled-service/503.html': source => 'puppet:///modules/roles/static-htdocs/disabled-service/503.html',