summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorHunter Haugen <h.haugen@gmail.com>2012-10-10 17:03:04 -0700
committerHunter Haugen <h.haugen@gmail.com>2012-10-10 17:03:04 -0700
commitc09e5a07cef578e1017af546e315f1c3826bf9a7 (patch)
treecaba811a27f5b967f2b7e0d01ab74f319b851bc4 /templates
parentd7ffbc326a8172bb0d0ecb888ed12d2c7e3eb7fd (diff)
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
Diffstat (limited to 'templates')
-rw-r--r--templates/haproxy_config_block.erb2
1 files changed, 1 insertions, 1 deletions
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| -%>