diff options
author | Adrien Thebo <adrien.thebo@gmail.com> | 2012-10-12 11:58:14 -0700 |
---|---|---|
committer | Adrien Thebo <adrien.thebo@gmail.com> | 2012-10-12 11:58:14 -0700 |
commit | 362d0ebf99b9dbfde8027646a84bf35f809be64f (patch) | |
tree | 4c07f89af518c81c4d76ec905e38547ada6af0bc /templates/haproxy_listen_block.erb | |
parent | 5d92b84d02befd48e1392bdd9ee21c7cb5a0b321 (diff) | |
parent | de367852d14c8c205c06cb6bfa9555fe01165a41 (diff) |
Merge pull request #14 from hunner/ports_string
Update ports to also accept a ,-separated string
Diffstat (limited to 'templates/haproxy_listen_block.erb')
-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| -%> |