Ver código fonte

only add hostname if external_ip is defined

systemd-xsession
pai
commit
8c82dbf3e4
1 arquivos alterados com 2 adições e 0 exclusões
  1. +2
    -0
      templates/ssh.config.j2

+ 2
- 0
templates/ssh.config.j2 Ver arquivo

@@ -1,4 +1,6 @@
{% for hostname in groups.vms %}
Host {{hostname}}
{% if 'external_ip' in hostvars[hostname] %}
HostName {{hostvars[hostname].external_ip}}
{% endif %}
{% endfor %}