X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fsnapshot_web.pp;h=b4d6703aff5487b8634f4996903a2a486c308718;hb=2f488926a0357a55878fd6f6c18727617a10f2be;hp=6054b5227218824986cdbb564e7d9d0e8915127c;hpb=8deca5e2e4da7378eb7c9916ca96fcc46e203530;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/snapshot_web.pp b/modules/roles/manifests/snapshot_web.pp index 6054b5227..b4d6703af 100644 --- a/modules/roles/manifests/snapshot_web.pp +++ b/modules/roles/manifests/snapshot_web.pp @@ -14,6 +14,11 @@ class roles::snapshot_web { } case $::hostname { + 'lw07': { + $ipv4addr = '185.17.185.185' + $ipv6addr = '2001:1af8:4020:b030:deb::185' + $ipv6addr_apache = '2001:1af8:4020:b030:deb::187' + } 'sallinen': { $ipv4addr = '193.62.202.27' $ipv6addr = '2001:630:206:4000:1a1a:0:c13e:ca1b' @@ -24,9 +29,8 @@ class roles::snapshot_web { } } - @ferm::rule { 'dsa-snapshot-varnish-v4': - rule => '&SERVICE(tcp, 6081)', - } + # varnish cache + ############### @ferm::rule { 'dsa-nat-snapshot-varnish-v4': table => 'nat', chain => 'PREROUTING', @@ -42,6 +46,7 @@ class roles::snapshot_web { content => template('roles/snapshot/snapshot.debian.org.vcl.erb'), } + # the ipv6 port 80 is owned by varnish file { '/etc/apache2/ports.conf': content => @("EOF"), Listen 0.0.0.0:80 @@ -50,4 +55,17 @@ class roles::snapshot_web { require => Package['apache2'], notify => Service['apache2'], } + + # haproxy ssl termination + ######################### + include haproxy + file { '/etc/haproxy/haproxy.cfg': + content => template('roles/snapshot/haproxy.cfg.erb'), + require => Package['haproxy'], + notify => Service['haproxy'], + } + ssl::service { 'snapshot.debian.org': + notify => Service['haproxy'], + key => true, + } }