From 378e5f1b3c9f6a4e10154204928f01ae07a787ca Mon Sep 17 00:00:00 2001 From: Blallo <blallo@autistici.org> Date: Tue, 2 Mar 2021 12:10:11 +0100 Subject: [PATCH] Allow custom options in haproxy config --- roles/float-infra-haproxy/templates/haproxy.cfg.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/float-infra-haproxy/templates/haproxy.cfg.j2 b/roles/float-infra-haproxy/templates/haproxy.cfg.j2 index 703e4b28..735f533f 100644 --- a/roles/float-infra-haproxy/templates/haproxy.cfg.j2 +++ b/roles/float-infra-haproxy/templates/haproxy.cfg.j2 @@ -33,8 +33,8 @@ backend be_{{ service_name }}_{{ ep.name }}_{{ port }} log global balance leastconn option independant-streams -{% for s in groups[service_name]|sort %} - server task{{ loop.index -1 }} {{ s }}.{{ service_name }}.{{ domain }}:{{ port }} check fall 3 id {{ loop.index + 999 }} inter 5000 rise 3 slowstart 60000 weight 50 +{% for s in groups[service_name]|sort %} + server task{{ loop.index -1 }} {{ s }}.{{ service_name }}.{{ domain }}:{{ port }} {{ service.get('haproxy_opts', '') }} check fall 3 id {{ loop.index + 999 }} inter 5000 rise 3 slowstart 60000 weight 50 {% endfor %} {% endfor %} # ep.ports @@ -50,7 +50,7 @@ backend be_{{ service_name }}_{{ ep.name }}_{{ ep.port }} balance leastconn option independant-streams {% for s in groups[service_name]|sort %} - server task{{ loop.index -1 }} {{ s }}.{{ service_name }}.{{ domain }}:{{ ep.port }} check fall 3 id {{ loop.index + 999 }} inter 5000 rise 3 slowstart 60000 weight 50 + server task{{ loop.index -1 }} {{ s }}.{{ service_name }}.{{ domain }}:{{ ep.port }} {{ service.get('haproxy_opts', '') }} check fall 3 id {{ loop.index + 999 }} inter 5000 rise 3 slowstart 60000 weight 50 {% endfor %} {% endif %} # ep.get('ports') -- GitLab