X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=inline;f=modules%2Froles%2Ftemplates%2Fstatic-mirroring%2Fvhost%2Fstatic-vhosts-simple.erb;h=2f38b7e48c39bb3d5b585e9498fa8bcad355616b;hb=9f7c89a4e68c7bfd5f3cafd67d4071f4ab0d2784;hp=3bbdaba6cea1b8fe549d60557ea77e4cf00fee91;hpb=b0c6b4af1ac5c354dfe135fa2089b0019ccdbd30;p=mirror%2Fdsa-puppet.git
diff --git a/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb
index 3bbdaba6c..2f38b7e48 100644
--- a/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb
+++ b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb
@@ -1,24 +1,75 @@
# puppet maintained
-Use common-static-vhost mozilla.debian.net
-Use common-static-vhost backports.debian.org
-Use common-static-vhost incoming.debian.org
-Use common-static-vhost news.debian.net
-Use common-static-vhost debaday.debian.net
-Use common-static-vhost debdeltas.debian.net
-Use common-static-vhost-with-extra metadata.ftp-master.debian.org "AddDefaultCharset utf-8"
-Use common-static-vhost-with-extra d-i.debian.org "ServerAlias d-i-backend.debian.org"
-Use common-static-vhost-with-extra network-test.debian.org "ServerAlias network-test-backend.debian.org"
-Use common-static-vhost-with-extra blends.debian.org "ServerAlias blends-backend.debian.org"
-Use common-static-vhost-with-extra wnpp-by-tags.debian.net "ServerAlias wnpp-by-tags-backend.debian.org"
-Use common-static-vhost appstream.debian.org
-Use common-static-vhost-ssl dsa.debian.org
-Use common-static-vhost-ssl rtc.debian.org
-Use common-static-vhost-with-extra security-team.debian.org "ServerAlias security-team-backend.debian.org"
+<%=
+
+def vhost(lines, sn, type=nil, extra=nil)
+ if scope.function_has_static_component([sn])
+ t = 'common-static-vhost'
+ if type then t += "-#{type}"; end
+
+ e = ''
+ if extra then e += " #{extra}"; end
+
+ lines << "Use #{t} #{sn}#{e}"
+ end
+end
+
+lines = []
+vhost(lines, "mozilla.debian.net")
+vhost(lines, "backports.debian.org")
+vhost(lines, "incoming.debian.org")
+vhost(lines, "debdeltas.debian.net")
+vhost(lines, "news.debian.net" , "ssl")
+vhost(lines, "debaday.debian.net" , "ssl")
+vhost(lines, "timeline.debian.net" , "ssl")
+vhost(lines, "network-test.debian.org" , "with-extra", '"ServerAlias network-test-backend.debian.org"')
+vhost(lines, "blends.debian.org" , "with-extra", '"ServerAlias blends-backend.debian.org"')
+vhost(lines, "wnpp-by-tags.debian.net" , "with-extra", '"ServerAlias wnpp-by-tags-backend.debian.org"')
+vhost(lines, "security-team.debian.org", "with-extra", '"ServerAlias security-team-backend.debian.org"')
+vhost(lines, "d-i.debian.org" , "ssl")
+vhost(lines, "appstream.debian.org", "ssl")
+vhost(lines, "dsa.debian.org" , "ssl")
+vhost(lines, "rtc.debian.org" , "ssl")
+
+vhost(lines, "10years.debconf.org")
+vhost(lines, "debconf0.debconf.org", "ssl")
+vhost(lines, "debconf1.debconf.org", "ssl")
+vhost(lines, "debconf2.debconf.org", "ssl")
+vhost(lines, "debconf3.debconf.org", "ssl")
+vhost(lines, "debconf4.debconf.org", "ssl")
+vhost(lines, "debconf5.debconf.org", "ssl")
+vhost(lines, "debconf6.debconf.org", "ssl")
+vhost(lines, "debconf7.debconf.org", "ssl")
+vhost(lines, "es.debconf.org")
+vhost(lines, "fr.debconf.org")
+vhost(lines, "miniconf10.debconf.org")
+
+vhost(lines, "deb.debian.org")
+
+lines.join("\n")
+-%>
+######################
+# metadata.ftp-master.debian.org
+<% if scope.function_has_static_component(['metadata.ftp-master.debian.org']) -%>
+ >
+ ServerName metadata.ftp-master.debian.org
+ ServerAdmin debian-admin@lists.debian.org
+
+ ErrorLog /var/log/apache2/metadata.ftp-master.debian.org-error.log
+ CustomLog /var/log/apache2/metadata.ftp-master.debian.org-access.log privacy
+
+ Use common-static-base metadata.ftp-master.debian.org
+ AddDefaultCharset utf-8
+
+ ForceType text/plain
+
+
+<% end -%>
-# bits.debian.org
######################
+# bits.debian.org
+<% if scope.function_has_static_component(['bits.debian.org']) -%>
ServerName bits.debian.org
ServerAdmin debian-admin@lists.debian.org
@@ -50,6 +101,7 @@ Use common-static-vhost-with-extra security-team.debian.org "ServerAlias securit
Use common-debian-service-ssl bits.debian.org
Use common-ssl-HSTS
+<% end -%>
# www.backports.org
###################
@@ -66,9 +118,9 @@ Use common-static-vhost-with-extra security-team.debian.org "ServerAlias securit
RedirectPermanent / http://backports.debian.org/
-
-# www.ports.debian.org
######################
+# www.ports.debian.org
+<% if scope.function_has_static_component(['www.ports.debian.org']) -%>
>
ServerName www.ports.debian.org
ServerAlias www.ports-backend.debian.org
@@ -95,10 +147,10 @@ Use common-static-vhost-with-extra security-team.debian.org "ServerAlias securit
<% end -%>
- DefaultType text/plain
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
AddOutputFilter INCLUDES .xhtml
+<% end -%>
>
ServerName www.debian-ports.org
@@ -117,6 +169,15 @@ Use common-static-vhost-with-extra security-team.debian.org "ServerAlias securit
RedirectPermanent / http://www.ports.debian.org/
+# video.debian.net
+###################
+ >
+ ServerName video.debian.net
+ ServerAdmin debian-admin@debian.org
+
+ Redirect / http://meetings-archive.debian.net/pub/debian-meetings/
+
+
# historical sites
##################
# now only redirects remain