diff options
author | binary <me@rgoncalves.se> | 2020-11-08 21:07:28 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2020-11-08 21:07:28 +0100 |
commit | af93e33875b4d5ed2199fbd9c75f71d4cb17ce58 (patch) | |
tree | 12c652c5d214e60259104c0715dfe2fb1dab681d | |
parent | 94846acc8c39debfa0597ae9e8b17e20dc385dc5 (diff) | |
download | infrastructure-af93e33875b4d5ed2199fbd9c75f71d4cb17ce58.tar.gz |
Fix missing host declaration
-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 }} |