diff options
author | Hunter Haugen <h.haugen@gmail.com> | 2012-10-12 11:48:35 -0700 |
---|---|---|
committer | Hunter Haugen <h.haugen@gmail.com> | 2012-10-12 11:53:52 -0700 |
commit | de367852d14c8c205c06cb6bfa9555fe01165a41 (patch) | |
tree | 4c07f89af518c81c4d76ec905e38547ada6af0bc /templates | |
parent | 3ab65f56a61cfedbe75a3b41143f0d44fbad0a93 (diff) |
Update ports to also accept a ,-separated string
Diffstat (limited to 'templates')
-rw-r--r-- | templates/haproxy_listen_block.erb | 2 |
1 files changed, 1 insertions, 1 deletions
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| -%> |