From af93e33875b4d5ed2199fbd9c75f71d4cb17ce58 Mon Sep 17 00:00:00 2001 From: binary Date: Sun, 8 Nov 2020 21:07:28 +0100 Subject: Fix missing host declaration --- roles/ssh/templates/generate_dns.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles') diff --git a/roles/ssh/templates/generate_dns.j2 b/roles/ssh/templates/generate_dns.j2 index 59c6233..58dc6d6 100644 --- a/roles/ssh/templates/generate_dns.j2 +++ b/roles/ssh/templates/generate_dns.j2 @@ -5,7 +5,7 @@ {% for h in groups["all"] %} {% set h = hostvars[h] %} {##} -{% if h.ip is defined %} +{% if h.ip is defined and h.services is defined %} {% set _port = h.services | selectattr("name", "equalto", "ssh") | map(attribute="port") | list | join(' ') %} {##} # {{ h.ansible_host }} -- cgit v1.2.3