Merge remote-tracking branch 'origin/master' into staging
[mirror/dsa-puppet.git] / modules / roles / templates / planet_master / planet-master.debian.org.erb
diff --git a/modules/roles/templates/planet_master/planet-master.debian.org.erb b/modules/roles/templates/planet_master/planet-master.debian.org.erb
new file mode 100644 (file)
index 0000000..95afcf0
--- /dev/null
@@ -0,0 +1,41 @@
+##
+## 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
+##
+
+Use common-debian-service-https-redirect * planet-master.debian.org
+<VirtualHost *:443>
+       ServerName planet-master.debian.org
+       ServerAdmin debian-admin@lists.debian.org
+
+       Use common-debian-service-ssl planet-master.debian.org
+       Use common-ssl-HSTS
+
+       <IfModule mod_userdir.c>
+               UserDir disabled
+       </IfModule>
+       ErrorLog ${APACHE_LOG_DIR}/planet-master.debian.org-error.log
+       CustomLog ${APACHE_LOG_DIR}/planet-master.debian.org-access.log privacy
+       ServerSignature On
+
+       DocumentRoot /srv/planet.debian.org/www
+       <Directory /srv/planet.debian.org/www>
+               # Localhost
+               Require ip ::1
+               Require ip 127.0.0.1
+<%=
+  lines = []
+  roles = scope.lookupvar('site::roles')
+  roles['planet_master'].each do |node|
+    lines << "\t\t# #{scope.lookupvar('site::allnodeinfo')[node]['hostname'][0]}"
+    scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'].each do |addr|
+      lines << "\t\tRequire ip #{addr}"
+    end
+  end
+  lines.join("\n")
+# vim:set et:
+# vim:set sts=2 ts=2:
+# vim:set shiftwidth=2:
+%>
+       </Directory>
+</VirtualHost>