summaryrefslogtreecommitdiffstats
path: root/roles/haproxy/templates/haproxy.cfg.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/haproxy/templates/haproxy.cfg.j2')
-rw-r--r--roles/haproxy/templates/haproxy.cfg.j225
1 files changed, 24 insertions, 1 deletions
diff --git a/roles/haproxy/templates/haproxy.cfg.j2 b/roles/haproxy/templates/haproxy.cfg.j2
index bfcdcfdb1..fddf0ede1 100644
--- a/roles/haproxy/templates/haproxy.cfg.j2
+++ b/roles/haproxy/templates/haproxy.cfg.j2
@@ -35,13 +35,36 @@ defaults
{% for frontend in haproxy_frontends %}
frontend {{ frontend.name }}
- bind {{ frontend.bind }}
+{% for bind in frontend.binds %}
+ bind {{ bind }}
+{% endfor %}
default_backend {{ frontend.default_backend }}
+{% if 'mode' in frontend %}
+ mode {{ frontend.mode }}
+{% endif %}
+{% if 'options' in frontend %}
+{% for option in frontend.options %}
+ option {{ option }}
+{% endfor %}
+{% endif %}
+{% if 'redirects' in frontend %}
+{% for redirect in frontend.redirects %}
+ redirect {{ redirect }}
+{% endfor %}
+{% endif %}
{% endfor %}
{% for backend in haproxy_backends %}
backend {{ backend.name }}
balance {{ backend.balance }}
+{% if 'mode' in backend %}
+ mode {{ backend.mode }}
+{% endif %}
+{% if 'options' in backend %}
+{% for option in backend.options %}
+ option {{ option }}
+{% endfor %}
+{% endif %}
{% for server in backend.servers %}
server {{ server.name }} {{ server.address }} {{ server.opts }}
{% endfor %}