X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fsnapshot_web.pp;h=ee9ab949f033ac67db73e0f99a4650604cdf83ab;hb=8d38f75440f0a903a4e2630b076a8d090a59b47e;hp=3067981912a9ab69719c9522293ade274ebaec4e;hpb=264927855fb19808481d7e91366f13e303ae7ddf;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/snapshot_web.pp b/modules/roles/manifests/snapshot_web.pp index 306798191..ee9ab949f 100644 --- a/modules/roles/manifests/snapshot_web.pp +++ b/modules/roles/manifests/snapshot_web.pp @@ -8,10 +8,6 @@ class roles::snapshot_web { ensure => 'installed', }) - ssl::service { 'snapshot.debian.org': - notify => Exec['service apache2 reload'], - key => true, - } apache2::site { '020-snapshot.debian.org': site => 'snapshot.debian.org', content => template('roles/snapshot/snapshot.debian.org.conf.erb') @@ -33,6 +29,8 @@ class roles::snapshot_web { } } + # varnish cache + ############### @ferm::rule { 'dsa-snapshot-varnish-v4': rule => '&SERVICE(tcp, 6081)', } @@ -51,6 +49,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 @@ -59,4 +58,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, + } }