diff --git a/templates/haproxy_cfg b/templates/haproxy_cfg index 3394742592d0fa52e87f6cbf15295a8fbcf12847..edd99a8ca3f1bd250d08450575808c473d485b16 100644 --- a/templates/haproxy_cfg +++ b/templates/haproxy_cfg @@ -126,7 +126,7 @@ backend backend_varnish {% if varnish_host == inventory_hostname %} server varnish 127.0.0.1:6081 maxconn 1000 {% else %} - server varnish {{ hostvars[varnish_host]['static_ipv4']|default(hostvars[varnish_host]['ansible_default_ipv4']['address']) }}:6081 maxconn 1000 + server varnish {{ varnish_host_ip|default('') }}:6081 maxconn 1000 {% endif %} {% endif %}