From f526ab513810756d64861756abdb8add01a4c624 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Tue, 28 Jul 2015 15:22:58 +0200
Subject: [PATCH] Get inithost to work with Ansible 1.9.x

---
 templates/haproxy_cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/haproxy_cfg b/templates/haproxy_cfg
index b992578..2e045f7 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 %}
-- 
GitLab