set TLSA port to 0 in preparation of cert roll for buildd, contributors, ftp-master...
[mirror/dsa-puppet.git] / modules / roles / manifests / debug_mirror.pp
1 class roles::debug_mirror {
2         $vhost_listen = $::hostname ? {
3                 klecker    => '130.89.148.14:80 [2001:610:1908:b000::148:14]:80',
4                 mirror-isc => '149.20.20.22:80 [2001:4f8:8:36::1deb:22]:80',
5                 default => '*:80',
6         }
7         $onion_v4_addr = $::hostname ? {
8                 klecker    => '130.89.148.14',
9                 mirror-isc => '149.20.20.22',
10                 default    => undef,
11         }
12
13         apache2::site { '010-debug.mirrors.debian.org':
14                 site   => 'debug.mirrors.debian.org',
15                 content => template('roles/apache-debug.mirrors.debian.org.erb'),
16         }
17
18         if has_role('static_mirror_onion') {
19                 if ! $onion_v4_addr {
20                         fail("Do not have an onion_v4_addr set for $::hostname.")
21                 }
22
23                 onion::service { 'debug.mirrors.debian.org':
24                         port => 80,
25                         target_port => 80,
26                         target_address => $onion_v4_addr,
27                 }
28         }
29 }