X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Ftemplates%2Fsyncproxy%2Fsyncproxy.debian.org-apache.erb;h=e81cbe3085ade100c5e110ccdf7aea8b1e95b35d;hb=f7b6fdd2d515765d88696ced52fb0e7e4dda06c0;hp=690ab30cdd2cede4b0a409a3c3dd070d64335a70;hpb=fbd4579fc940f349d6dfc480381b3a671c453555;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb b/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb index 690ab30cd..e81cbe308 100644 --- a/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb +++ b/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb @@ -4,25 +4,25 @@ ## <% - vhost_listen = [ (bind != '') ? "#{bind}" : "*", (bind6 != '') ? "#{bind6}" : "*"].uniq - vhost_listen_443 = [ (bind != '') ? "#{bind}:443" : "*:443", (bind6 != '') ? "[#{bind6}]:443" : "*:443"].uniq + vhost_listen = [ (@bind != '') ? "#{@bind}" : "*", (@bind6 != '') ? "#{@bind6}" : "*"].uniq + vhost_listen_443 = [ (@bind != '') ? "#{@bind}:443" : "*:443", (@bind6 != '') ? "[#{@bind6}]:443" : "*:443"].uniq %> <%= lines = [] vhost_listen.each do |bind| - lines << "Use common-debian-service-https-redirect \"#{bind}\" \"#{syncproxy_name}\"" + lines << "Use common-debian-service-https-redirect \"#{bind}\" \"#{@syncproxy_name}\"" end lines.join("\n") %> > - ServerName <%= syncproxy_name %> + 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 %> Require all granted @@ -35,7 +35,7 @@ lines.join("\n") 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)) + if has_variable?(varname) and (eval("@"+varname)) lines << " Alias /#{archive}/project/trace/ /srv/mirrors/#{archive}/project/trace/" lines << " " lines << " Require all granted"