Просмотр исходного кода

only add hostname if external_ip is defined

systemd-xsession
Markus Katharina Brechtel 5 лет назад
Родитель
Сommit
8c82dbf3e4
1 измененных файлов: 2 добавлений и 0 удалений
  1. +2
    -0
      templates/ssh.config.j2

+ 2
- 0
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 %}