2 class roles::static_mirror_web(
3 String $vhost_listen = '*:80',
4 String $vhost_listen_443 = '*:443',
5 Boolean $onion_service = false,
6 Optional[Stdlib::IP::Address] $onion_addr = undef,
8 include roles::static_mirror
9 include roles::weblog_provider
11 include apache2::expires
12 include apache2::rewrite
14 package { 'libapache2-mod-geoip': ensure => installed, }
15 package { 'geoip-database': ensure => installed, }
18 apache2::module { 'include': }
19 apache2::module { 'geoip': require => [Package['libapache2-mod-geoip'], Package['geoip-database']]; }
20 apache2::module { 'deflate': }
21 apache2::module { 'filter': }
23 $redirect_vhosts = true
25 apache2::config { 'local-static-vhost.conf':
28 apache2::config { 'local-static-vhost':
29 content => template('roles/static-mirroring/static-vhost.conf.erb'),
32 apache2::site { '010-planet.debian.org':
33 site => 'planet.debian.org',
34 ensure => has_static_component('planet.debian.org') ? { true => 'present', false => 'absent' },
35 content => template('roles/static-mirroring/vhost/planet.debian.org.erb'),
38 apache2::site { '010-lintian.debian.org':
39 site => 'lintian.debian.org',
43 apache2::site { '010-static-vhosts-00-manpages':
44 site => 'static-manpages.debian.org',
45 ensure => has_static_component('manpages.debian.org') ? { true => 'present', false => 'absent' },
46 content => template('roles/static-mirroring/vhost/manpages.debian.org.erb'),
48 apache2::site { '010-static-vhosts-simple':
49 site => 'static-vhosts-simple',
50 content => template('roles/static-mirroring/vhost/static-vhosts-simple.erb'),
53 $wwwdo_server_name = 'www.debian.org'
54 $wwwdo_document_root = '/srv/static.debian.org/mirrors/www.debian.org/cur'
55 apache2::site { '005-www.debian.org':
56 site => 'www.debian.org',
57 ensure => has_static_component('www.debian.org') ? { true => 'present', false => 'absent' },
58 content => template('roles/apache-www.debian.org.erb'),
61 ssl::service { 'www.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
62 ssl::service { 'debian.org' :
63 ensure => has_static_component('www.debian.org') ? { true => 'present', false => 'absent' },
64 notify => Exec['service apache2 reload'],
69 ssl::service { 'appstream.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
70 ssl::service { 'backports.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
71 ssl::service { 'bits.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
72 ssl::service { 'blends.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
73 ssl::service { 'cdbuilder-logs.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true }
74 ssl::service { 'd-i.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true }
75 ssl::service { 'deb.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true }
76 ssl::service { 'dpl.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true }
77 ssl::service { 'dsa.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true }
78 ssl::service { 'incoming.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
79 ssl::service { 'incoming.ports.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
80 ssl::service { 'lintian.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
81 ssl::service { 'lists.alioth.debian.org' : ensure => 'present', notify => Exec['service apache2 reload'], key => true, }
82 ssl::service { 'manpages.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
83 ssl::service { 'metadata-backend.ftp-master.debian.org':
84 ensure => has_static_component('metadata.ftp-master.debian.org') ? { true => 'present', false => 'absent' },
85 notify => Exec['service apache2 reload'],
88 ssl::service { 'mirror-master.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
89 ssl::service { 'onion.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
90 ssl::service { 'openpgpkey.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
91 ssl::service { 'pkg-ruby-extras.alioth.debian.org' : ensure => 'present', notify => Exec['service apache2 reload'], key => true, }
92 ssl::service { 'planet-backend.debian.org' :
93 ensure => has_static_component('planet.debian.org') ? { true => 'present', false => 'absent' },
94 notify => Exec['service apache2 reload'],
97 ssl::service { 'release.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
98 ssl::service { 'rtc.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true }
99 ssl::service { 'security-team.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
100 ssl::service { 'www.ports.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
102 ssl::service { 'bootstrap.debian.net' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
103 ssl::service { 'debaday.debian.net' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
104 ssl::service { 'debdeltas.debian.net' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
105 ssl::service { 'micronews.debian.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
106 ssl::service { 'mozilla.debian.net' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
107 ssl::service { 'news.debian.net' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
108 ssl::service { 'sources.debian.net' : ensure => 'present', notify => Exec['service apache2 reload'], key => true, }
109 ssl::service { 'timeline.debian.net' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
110 ssl::service { 'video.debian.net' : ensure => 'present', notify => Exec['service apache2 reload'], key => true, }
111 ssl::service { 'wnpp-by-tags.debian.net' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
113 ssl::service { 'debconf.org' : ensure => 'present', notify => Exec['service apache2 reload'], key => true, }
114 ssl::service { '10years.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
115 ssl::service { 'debconf0.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
116 ssl::service { 'debconf1.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
117 ssl::service { 'debconf16.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
118 ssl::service { 'debconf17.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
119 ssl::service { 'debconf18.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
120 ssl::service { 'debconf19.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
121 ssl::service { 'debconf2.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
122 ssl::service { 'debconf3.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
123 ssl::service { 'debconf4.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
124 ssl::service { 'debconf5.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
125 ssl::service { 'debconf6.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
126 ssl::service { 'debconf7.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
127 ssl::service { 'es.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
128 ssl::service { 'fr.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
129 ssl::service { 'miniconf10.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
130 ssl::service { 'video.debconf.org' : ensure => 'present', notify => Exec['service apache2 reload'], key => true, }
131 ssl::service { 'wiki.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
132 include apache2::proxy_http
133 ssl::service { 'www.debconf.org' : ensure => 'ifstatic', notify => Exec['service apache2 reload'], key => true, }
138 fail("Do not have an onion_addr set for $::hostname.")
141 onion::service { 'd-i.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
142 onion::service { 'dpl.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
143 onion::service { 'dsa.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
144 onion::service { 'rtc.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
145 onion::service { 'www.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
148 onion::service { 'appstream.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
149 onion::service { 'backports.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
150 onion::service { 'bits.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
151 onion::service { 'blends.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
152 onion::service { 'cdbuilder-logs.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
153 onion::service { 'incoming.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
154 onion::service { 'incoming.ports.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
155 onion::service { 'lintian.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
156 onion::service { 'manpages.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
157 onion::service { 'mirror-master.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
158 onion::service { 'onion.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
159 onion::service { 'openpgpkey.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
160 onion::service { 'release.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
161 onion::service { 'security-team.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
162 onion::service { 'www.ports.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
164 onion::service { 'bootstrap.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
165 onion::service { 'debaday.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
166 onion::service { 'debdeltas.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
167 onion::service { 'micronews.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
168 onion::service { 'mozilla.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
169 onion::service { 'news.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
170 onion::service { 'timeline.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
171 onion::service { 'wnpp-by-tags.debian.net' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
173 onion::service { '10years.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
174 onion::service { 'debconf0.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
175 onion::service { 'debconf1.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
176 onion::service { 'debconf16.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
177 onion::service { 'debconf17.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
178 onion::service { 'debconf18.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
179 onion::service { 'debconf2.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
180 onion::service { 'debconf3.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
181 onion::service { 'debconf4.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
182 onion::service { 'debconf5.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
183 onion::service { 'debconf6.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
184 onion::service { 'debconf7.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
185 onion::service { 'es.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
186 onion::service { 'fr.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
187 onion::service { 'miniconf10.debconf.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
190 onion::service { 'metadata.ftp-master.debian.org': ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
191 onion::service { 'planet.debian.org' : ensure => 'ifstatic', port => 80, target_port => 80, target_address => $onion_addr }
194 file { '/srv/static.debian.org/puppet':
198 file { '/srv/static.debian.org/puppet/disabled-service':
202 file { '/srv/static.debian.org/puppet/disabled-service/503.html':
203 source => 'puppet:///modules/roles/static-htdocs/disabled-service/503.html',
206 ssl::service { 'archive.debian.net': ensure => present, notify => Exec['service apache2 reload'], key => true, }
207 file { '/srv/static.debian.org/puppet/archive.debian.net':
210 file { '/srv/static.debian.org/puppet/archive.debian.net/503.html':
214 ssl::service { 'cdimage.debian.org': ensure => present, notify => Exec['service apache2 reload'], key => true, }
215 file { '/srv/static.debian.org/puppet/cdimage.debian.org':
218 file { '/srv/static.debian.org/puppet/cdimage.debian.org/503.html':
219 source => 'puppet:///modules/roles/static-htdocs/cdimage-maintenance.html',