aboutsummaryrefslogtreecommitdiffstats
path: root/roles/ssh/templates/generate_dns.j2
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2020-11-08 21:07:28 +0100
committerbinary <me@rgoncalves.se>2020-11-08 21:07:28 +0100
commitaf93e33875b4d5ed2199fbd9c75f71d4cb17ce58 (patch)
tree12c652c5d214e60259104c0715dfe2fb1dab681d /roles/ssh/templates/generate_dns.j2
parent94846acc8c39debfa0597ae9e8b17e20dc385dc5 (diff)
downloadinfrastructure-af93e33875b4d5ed2199fbd9c75f71d4cb17ce58.tar.gz
Fix missing host declaration
Diffstat (limited to 'roles/ssh/templates/generate_dns.j2')
-rw-r--r--roles/ssh/templates/generate_dns.j22
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 }}
remember that computers suck.