From fa53570b0ec2707aaa7f1e16bc94ce5e3d607332 Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 12 Apr 2017 09:13:54 +0200 Subject: [PATCH] Use list of binds in apache config for syncproxies --- .../syncproxy/syncproxy.debian.org-apache.erb | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb b/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb index 6da98e676..eb59b0c8c 100644 --- a/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb +++ b/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb @@ -3,20 +3,11 @@ ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## -<% - vhost_listen = [ (@bind != '') ? "#{@bind}" : "*", (@bind6 != '') ? "#{@bind6}" : "*"].uniq - vhost_listen_443 = [ (@bind != '') ? "#{@bind}:443" : "*:443", (@bind6 != '') ? "[#{@bind6}]:443" : "*:443"].uniq -%> +<% @binds.each do |bind| -%> + Use common-debian-service-https-redirect "<%= bind %>" "<%= @syncproxy_name %>" +<% end -%> -<%= -lines = [] -vhost_listen.each do |bind| - lines << "Use common-debian-service-https-redirect \"#{@bind}\" \"#{@syncproxy_name}\"" -end -lines.join("\n") - -%> - > + > ServerName <%= @syncproxy_name %> DocumentRoot /srv/www/syncproxy.debian.org/htdocs -- 2.20.1