'klecker' => '2001:610:1908:b000::148:10',
default => ''
}
+ $syncproxy_name = $::hostname ? {
+ 'milanollo' => 'syncproxy3.eu.debian.org',
+ 'mirror-isc' => 'syncproxy2.wna.debian.org',
+ 'mirror-umn' => 'syncproxy.cna.debian.org',
+ 'klecker' => 'syncproxy2.eu.debian.org',
+ default => 'unknown'
+ }
rsync::site { 'syncproxy':
content => template('roles/syncproxy/rsyncd.conf.erb'),
group => 'mirroradm',
mode => 0660,
}
+
+ if $::apache2 and $syncproxy_name != 'unknown' {
+ apache2::site { '010-syncproxy.debian.org':
+ site => 'security.debian.org',
+ content => template('roles/syncproxy/syncproxy.debian.org-apache.erb')
+ }
+
+ file { [ '/srv/www/syncproxy.debian.org', '/srv/www/syncproxy.debian.org/htdocs' ]:
+ ensure => directory,
+ mode => '0755',
+ }
+ file { '/srv/www/syncproxy.debian.org/htdocs/index.html':
+ content => template('roles/syncproxy/syncproxy.debian.org-index.html.erb')
+ }
+ }
}
--- /dev/null
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+<%
+ vhost_listen = [ (bind != '') ? "#{bind}:80" : "*:80", (bind6 != '') ? "#{bind6}:80" : "*:80"].uniq.join(' ')
+%>
+
+<Virtualhost <%= vhost_listen %> >
+ ServerName <%= syncproxy_name %>
+ DocumentRoot /srv/www/syncproxy.debian.org/htdocs
+
+ <Directory /srv/www/syncproxy.debian.org/htdocs>
+ Require all granted
+ </Directory>
+
+ CustomLog /var/log/apache2/syncproxy.debian.org-access.log privacy
+ ErrorLog /var/log/apache2/syncproxy.debian.org-error.log
+
+<%=
+lines = []
+%w{debian debian-backports debian-debug debian-security}.each do |archive|
+ varname = 'has_srv_mirrors_' + archive.gsub(/[\/-]/,'_')
+ if has_variable?(varname) and (eval(varname)) == 'true'
+ lines << " Alias /#{archive}/project/trace/ /srv/mirrors/#{archive}/project/trace/"
+ lines << " <Directory /srv/mirrors/#{archive}/project/trace/>"
+ lines << " Require all granted"
+ lines << " IndexOptions NameWidth=* +SuppressDescription"
+ lines << " Options +Indexes"
+ lines << " </Directory>"
+ end
+end
+
+lines.join("\n")
+%>
+
+</VirtualHost>
+
+# vim: set ts=3 sw=3 et:
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+ <TITLE>Welcome to <%= syncproxy_name %>!</TITLE>
+</HEAD>
+<BODY>
+
+<H1>Welcome to <%= syncproxy_name %>!</H1>
+
+This is <%= syncproxy_name %>, a syncproxy run by and for the <a
+href="https://www.debian.org/">Debian Project</a> to aid in mirroring
+our software. Consult <a href="https://www.debian.org/mirror/">the
+mirrors section of the Debian website</a> for more information.
+
+<p>
+This syncproxy contains copies of the following archives.
+
+<ul>
+<%=
+lines = []
+%w{debian debian-backports debian-debug debian-security}.each do |archive|
+ varname = 'has_srv_mirrors_' + archive.gsub(/[\/-]/,'_')
+ if has_variable?(varname) and (eval(varname)) == 'true'
+ lines << "<li>#{archive} [<a href=\"/#{archive}/project/trace/\">trace directory</a>]</li>"
+ end
+end
+lines.join("\n")
+%>
+</ul>
+
+
+<p>
+Please contact the Debian mirrors team for rsync access if your
+mirror should become a push primary mirror (see the documenation).
+
+<P>
+<HR NOSHADE />
+<FONT size="-1">Debian mirrors team</FONT>
+
+</BODY>
+</HTML>