1 class roles::security_mirror {
2 include roles::archvsync_base
4 $rsync_bind = $::hostname ? {
5 mirror-anu => '150.203.164.61',
6 mirror-bytemark => '5.153.231.46',
7 mirror-conova => '217.196.149.233',
8 mirror-isc => '149.20.4.14',
9 mirror-umn => '128.101.240.215',
12 $rsync_bind6 = $::hostname ? {
13 mirror-anu => '2001:388:1034:2900::3d',
14 mirror-bytemark => '2001:41c8:1000:21::21:46',
15 mirror-conova => '2a02:16a8:dc41:100::233',
16 mirror-isc => '2001:4f8:1:c::14',
17 mirror-umn => '2607:ea00:101:3c0b::1deb:215',
20 $ftp_bind = $rsync_bind
21 $ftp_bind6 = $rsync_bind6
23 file { '/srv/mirrors/debian-security':
25 target => '../ftp.root/debian-security',
27 file { '/srv/ftp.root':
30 file { '/srv/ftp.root/.nobackup':
34 file { '/srv/ftp.root/debian-security':
36 owner => 1176, # archvsync
37 group => 1176, # archvsync
41 include apache2::expires
42 include apache2::rewrite
44 apache2::site { '010-security.debian.org':
45 site => 'security.debian.org',
46 content => template('roles/security_mirror/security.debian.org.erb')
49 if has_role('security_mirror_no_ftp') {
50 vsftpd::site { [ 'security', 'security6' ]:
52 root => '/nonexistent',
55 include ferm::ftp_conntrack
56 vsftpd::site { 'security':
57 banner => 'security.debian.org FTP server (vsftpd)',
58 logfile => '/var/log/ftp/vsftpd-security.debian.org.log',
60 root => '/srv/ftp.root/',
63 if ($ftp_bind6 != '') {
64 vsftpd::site { 'security6':
65 banner => 'security.debian.org FTP server (vsftpd)',
66 logfile => '/var/log/ftp/vsftpd-security6.debian.org.log',
68 root => '/srv/ftp.root/',
74 rsync::site { 'security':
75 source => 'puppet:///modules/roles/security_mirror/rsyncd.conf',
78 bind6 => $rsync_bind6,
81 $onion_v4_addr = $::hostname ? {
82 mirror-anu => '150.203.164.61',
83 mirror-isc => '149.20.4.14',
84 mirror-umn => '128.101.240.215',
85 villa => '212.211.132.32',
86 lobos => '212.211.132.250',
89 if has_role('security_mirror_onion') {
91 fail("Do not have an onion_v4_addr set for $::hostname.")
94 onion::service { 'security.debian.org':
97 target_address => $onion_v4_addr,