This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
ka
/
ansible-role-home
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
only add hostname if external_ip is defined
systemd-xsession
Markus Katharina Brechtel
4 years ago
parent
6f25d6fc32
commit
8c82dbf3e4
1 changed files
with
2 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
templates/ssh.config.j2
+ 2
- 0
templates/ssh.config.j2
View File
@@ -1,4 +1,6 @@
{% for hostname in groups.vms %}
Host {{hostname}}
{% if 'external_ip' in hostvars[hostname] %}
HostName {{hostvars[hostname].external_ip}}
{% endif %}
{% endfor %}