class roles::snapshot_web { include apache2 include apache2::rewrite ensure_packages ( [ "libapache2-mod-wsgi", ], { ensure => 'installed', }) apache2::site { '020-snapshot.debian.org': site => 'snapshot.debian.org', content => template('roles/snapshot/snapshot.debian.org.conf.erb') } case $::hostname { 'sallinen': { varnish::config { 'default': listen => [ ':6081', '[2001:630:206:4000:1a1a:0:c13e:ca1b]:80' ], backend => 'file,/var/lib/varnish/varnish_storage.bin,8G', content => template('roles/snapshot/snapshot.debian.org.vcl.erb'), } file { '/etc/apache2/ports.conf': content => @("EOF"), Listen 0.0.0.0:80 Listen [2001:630:206:4000:1a1a:0:c13e:ca1a]:80 | EOF require => Package['apache2'], notify => Service['apache2'], } } default: { fail ( "unknown host $::hostname for snapshot_web." ) } } }