diff options
Diffstat (limited to 'roles/ssh')
-rw-r--r-- | roles/ssh/templates/generate_dns.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
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 }} |