From c09e5a07cef578e1017af546e315f1c3826bf9a7 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Wed, 10 Oct 2012 17:03:04 -0700 Subject: Allow multiple ports to be passed haproxy supports a single port or port range, but also muliples of those. This commit changes the 'virtual_ip_port' parameter to 'ports' and updates the template to accept an array of ports --- templates/haproxy_config_block.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/haproxy_config_block.erb b/templates/haproxy_config_block.erb index 8737dfc..42d0e06 100644 --- a/templates/haproxy_config_block.erb +++ b/templates/haproxy_config_block.erb @@ -1,5 +1,5 @@ -listen <%= name %> <%= virtual_ip %>:<%= virtual_ip_port %> +listen <%= name %> <%= virtual_ip %>:<%= Array(ports).join(",#{virtual_ip}:") %> <% haproxy_config_options.sort.each do |key, val| -%> <% if val.is_a?(Array) -%> <% val.each do |item| -%> -- cgit v1.2.3