diff --git a/states/haproxy/templates/haproxy.cfg.j2 b/states/haproxy/templates/haproxy.cfg.j2 index ed04598..5cae666 100644 --- a/states/haproxy/templates/haproxy.cfg.j2 +++ b/states/haproxy/templates/haproxy.cfg.j2 @@ -298,6 +298,8 @@ backend {{ name }} from {{ haproxy.config.namespace }} {{ compression() }} {%- endif %} + default-server weight 100 inter 1s fall 5 + {%- if values.internal|default(False) %} {{ internal() }} {%- endif %} @@ -322,7 +324,7 @@ listen {{ name }} from {{ haproxy.config.namespace }} timeout server 1s option spop-check {%- endif %} - default-server inter 1s fall 5 + default-server weight 100 inter 1s fall 5 {{- tcpendpoints(servers=values.servers|default([]), check=values.check|default(haproxy.config.check)) }} {% endfor %}