From dde8f76d79a842e2ef2bb7d92de97964d417b2cd Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Fri, 8 May 2020 09:54:29 +0200
Subject: [PATCH] ansible-inventories/arocom#2898 Prepare Varnish health check
 in HaProxy

---
 templates/haproxy_cfg.jinja2 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/templates/haproxy_cfg.jinja2 b/templates/haproxy_cfg.jinja2
index 110e09a..b635792 100644
--- a/templates/haproxy_cfg.jinja2
+++ b/templates/haproxy_cfg.jinja2
@@ -430,9 +430,9 @@ backend backend_varnish
   option forwardfor
   hash-type consistent
 {% if varnish_host == inventory_hostname %}
-  server varnish 127.0.0.1:6081 maxconn {{proxy_varnish_maxconn}}
+  server varnish 127.0.0.1:6081 check maxconn {{proxy_varnish_maxconn}}
 {% else %}
-  server varnish {{ varnish_host_ip|default('') }}:6081 maxconn {{proxy_varnish_maxconn}}
+  server varnish {{ varnish_host_ip|default('') }}:6081 check maxconn {{proxy_varnish_maxconn}}
 {% endif %}
 
 backend backend_varnish_bigpipe
@@ -446,9 +446,9 @@ backend backend_varnish_bigpipe
   option forwardfor
   hash-type consistent
 {% if varnish_host == inventory_hostname %}
-  server varnish 127.0.0.1:6081 maxconn {{proxy_varnish_maxconn}}
+  server varnish 127.0.0.1:6081 check maxconn {{proxy_varnish_maxconn}}
 {% else %}
-  server varnish {{ varnish_host_ip|default('') }}:6081 maxconn {{proxy_varnish_maxconn}}
+  server varnish {{ varnish_host_ip|default('') }}:6081 check maxconn {{proxy_varnish_maxconn}}
 {% endif %}
 {% endif %}
 
-- 
GitLab