Fix for situation when haproxy has nothing for listen to
Change-Id: Ie19d077a79d8bb87d1da78d5ad7081bae7cb100a
diff --git a/haproxy/files/haproxy.cfg b/haproxy/files/haproxy.cfg
index 513db53..1bb2029 100644
--- a/haproxy/files/haproxy.cfg
+++ b/haproxy/files/haproxy.cfg
@@ -44,7 +44,7 @@
timeout server {{ proxy.get('timeout', {}).get('server', '1m') }}
timeout check {{ proxy.get('timeout', {}).get('check', '10s') }}
-{%- if proxy.listen.admin_page is defined and proxy.listen.admin_page.user is defined %}
+{%- if proxy.get('listen') is mapping and proxy.listen.admin_page is defined and proxy.listen.admin_page.user is defined %}
userlist STATSUSERS
group admin users admin