From 96e951d7f5a8844d6d51a936de77e862fb3ba328 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Wed, 10 Jan 2018 14:03:42 +0100 Subject: [PATCH] Bug fix --- templates/etc_hosts.jinja2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/etc_hosts.jinja2 b/templates/etc_hosts.jinja2 index e4201d9..177f6ca 100644 --- a/templates/etc_hosts.jinja2 +++ b/templates/etc_hosts.jinja2 @@ -46,9 +46,11 @@ ff02::2 ip6-allrouters {% endif %} {% endfor %} -{% for hostname, host in (commonauth_extras|default([])).iteritems() %} +{% if commonauth_extras is defined %} +{% for hostname, host in commonauth_extras.iteritems() %} {% if host.ip is defined %} {{ host.ip }} {{ hostname }}{% for alias in host.aliases|default([]) %} {{ alias }}{% endfor %} {% endif %} {% endfor %} +{% endif %} -- GitLab