diff --git a/roles/confd/templates/haproxy.tmpl.j2 b/roles/confd/templates/haproxy.tmpl.j2 index ff7fa50b5..2b7e37d15 100644 --- a/roles/confd/templates/haproxy.tmpl.j2 +++ b/roles/confd/templates/haproxy.tmpl.j2 @@ -111,6 +111,7 @@ listen replicas_async {{end}}{% endraw %} {% endif %} + {% if with_haproxy_direct_connections|bool and pgbouncer_install|bool %} listen master_direct {% if cluster_vip is defined and cluster_vip | length > 0 %} @@ -125,7 +126,6 @@ listen master_direct default-server inter 3s fastinter 1s fall 3 rise 4 on-marked-down shutdown-sessions {% raw %}{{range gets "/members/*"}} server {{base .Key}} {{$data := json .Value}}{{base (replace (index (split $data.conn_url "/") 2) "@" "/" -1)}} check port {{index (split (index (split $data.api_url "/") 2) ":") 1}} {{end}}{% endraw %} -{% endif %} listen replicas_direct