summaryrefslogtreecommitdiff
path: root/templates/haproxy_listen_block.erb
diff options
context:
space:
mode:
authorHunter Haugen <h.haugen@gmail.com>2012-10-12 11:49:39 -0700
committerHunter Haugen <h.haugen@gmail.com>2012-10-12 11:49:39 -0700
commit5d92b84d02befd48e1392bdd9ee21c7cb5a0b321 (patch)
tree1318b8a2daf4ab737d4e01b85328315a2df926ac /templates/haproxy_listen_block.erb
parentf96656440027fbfc73bccf1911c817d7e4392713 (diff)
parent3ab65f56a61cfedbe75a3b41143f0d44fbad0a93 (diff)
Merge pull request #13 from hunner/rename_everything
Rename everything! Reviewed by: Cody
Diffstat (limited to 'templates/haproxy_listen_block.erb')
-rw-r--r--templates/haproxy_listen_block.erb11
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/haproxy_listen_block.erb b/templates/haproxy_listen_block.erb
new file mode 100644
index 0000000..66abf1f
--- /dev/null
+++ b/templates/haproxy_listen_block.erb
@@ -0,0 +1,11 @@
+
+listen <%= name %> <%= ipaddress %>:<%= Array(ports).join(",#{ipaddress}:") %>
+<% options.sort.each do |key, val| -%>
+<% if val.is_a?(Array) -%>
+<% val.each do |item| -%>
+ <%= key %> <%= item %>
+<% end -%>
+<% else -%>
+ <%= key %> <%= val %>
+<% end -%>
+<% end -%>