Disable reverse lookup in rsyncd
[mirror/dsa-puppet.git] / modules / roles / templates / syncproxy / syncproxy.debian.org-apache.erb
index b1a9538..eb59b0c 100644 (file)
@@ -3,19 +3,17 @@
 ## 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(' ')
-  vhost_listen_443 = [ (bind != '') ? "#{bind}:443" : "*:443",  (bind6 != '') ? "#{bind6}:443" : "*:443"].uniq.join(' ')
-%>
+<% @binds.each do |bind| -%>
+  Use common-debian-service-https-redirect "<%= bind %>" "<%= @syncproxy_name %>"
+<% end -%>
 
-Use common-debian-service-https-redirect "<%= vhost_listen %>" <%= syncproxy_name %>
-<Virtualhost <%= vhost_listen_443 %> >
-   ServerName <%= syncproxy_name %>
+<Virtualhost <%= @binds.map { |bind| "#{bind}:443" }.join(' ') %> >
+   ServerName <%= @syncproxy_name %>
    DocumentRoot /srv/www/syncproxy.debian.org/htdocs
 
-   Use common-debian-service-ssl <%= syncproxy_name %>
+   Use common-debian-service-ssl <%= @syncproxy_name %>
    Use common-ssl-HSTS
-   Use http-pkp-<%= syncproxy_name %>
+   Use http-pkp-<%= @syncproxy_name %>
 
    <Directory /srv/www/syncproxy.debian.org/htdocs>
       Require all granted
@@ -28,7 +26,7 @@ Use common-debian-service-https-redirect "<%= vhost_listen %>" <%= syncproxy_nam
 lines = []
 %w{debian debian-debug debian-ports debian-security}.each do |archive|
   varname = 'has_srv_mirrors_' + archive.gsub(/[\/-]/,'_')
-  if has_variable?(varname) and (eval(varname)) == 'true'
+  if has_variable?(varname) and (eval("@"+varname))
     lines << "  Alias /#{archive}/project/trace/ /srv/mirrors/#{archive}/project/trace/"
     lines << "  <Directory /srv/mirrors/#{archive}/project/trace/>"
     lines << "    Require all granted"