From de367852d14c8c205c06cb6bfa9555fe01165a41 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 12 Oct 2012 11:48:35 -0700 Subject: Update ports to also accept a ,-separated string --- templates/haproxy_listen_block.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/haproxy_listen_block.erb b/templates/haproxy_listen_block.erb index 66abf1f..12f55f6 100644 --- a/templates/haproxy_listen_block.erb +++ b/templates/haproxy_listen_block.erb @@ -1,5 +1,5 @@ -listen <%= name %> <%= ipaddress %>:<%= Array(ports).join(",#{ipaddress}:") %> +listen <%= name %> <%= ipaddress %>:<%= Array(ports).collect { |x| x.split(',')}.flatten.join(",#{ipaddress}:") %> <% options.sort.each do |key, val| -%> <% if val.is_a?(Array) -%> <% val.each do |item| -%> -- cgit v1.2.3