diff --git a/templates/haproxy_cfg b/templates/haproxy_cfg index b99257897e41ecc212d9d7f80631572b57e8fc63..2e045f75a1811696886d6777343b3550ba111e85 100644 --- a/templates/haproxy_cfg +++ b/templates/haproxy_cfg @@ -92,7 +92,7 @@ frontend https-in {% for host in groups['all'] %} {% if (hostvars[host]['proxy_domains']) or (hostvars[host]['proxy_ssl_domains']) or (hostvars[host]['proxy_crm_domains']) %} backend backend_{{host}} - server server_{{host}} {{hostvars[host]['ansible_default_ipv4']['address']}}:80 maxconn 32 + server server_{{host}} {{hostvars[host]['ansible_default_ipv4']['address']|default(hostvars[host]['static_ipv4'])}}:80 maxconn 32 {% endif %} {% endfor %}