summaryrefslogtreecommitdiff
path: root/templates/haproxy_balancermember.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/haproxy_balancermember.erb')
-rw-r--r--templates/haproxy_balancermember.erb6
1 files changed, 2 insertions, 4 deletions
diff --git a/templates/haproxy_balancermember.erb b/templates/haproxy_balancermember.erb
index fca4f0b..1d03f56 100644
--- a/templates/haproxy_balancermember.erb
+++ b/templates/haproxy_balancermember.erb
@@ -1,5 +1,3 @@
-<% for @ip,@host in Array(@balancer_ip).zip(Array(@server_name)) %> server <%= @host %> <%= @ip %>:<%= balancer_port %> <%
- items = balancermember_options
- items = [items] unless balancermember_options.instance_of? Array
- items.each do |item| %> <%= item %><% end %>
+<% Array(ipaddresses).zip(Array(server_names)).each do |ipaddress,host| -%>
+ server <%= host %> <%= ipaddress %>:<%= Array(ports).collect {|x|x.split(',')}.flatten.join(",#{ipaddress}:") %> <%= Array(options).join(" ") %>
<% end %>