Merge "Fix for situation when haproxy has nothing for listen to"
diff --git a/haproxy/files/haproxy.cfg b/haproxy/files/haproxy.cfg
index ec7f7fc..f86f379 100644
--- a/haproxy/files/haproxy.cfg
+++ b/haproxy/files/haproxy.cfg
@@ -53,7 +53,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