diff --git a/templates/ssh.config.j2 b/templates/ssh.config.j2 index 6fafa7a..77ce8a7 100644 --- a/templates/ssh.config.j2 +++ b/templates/ssh.config.j2 @@ -1,4 +1,6 @@ {% for hostname in groups.vms %} Host {{hostname}} +{% if 'external_ip' in hostvars[hostname] %} HostName {{hostvars[hostname].external_ip}} +{% endif %} {% endfor %}