Merge pull request #963 from rutsky/bastion-ansible-host
handle both 'ansible_host' and 'ansible_ssh_host' in bastion configration
This commit is contained in:
commit
edcd91f7f6
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
{% for h in groups['all'] %}
|
||||
{% if h != 'bastion' %}
|
||||
{% if vars.update({'hosts': vars['hosts'] + ' ' + hostvars[h]['ansible_ssh_host']}) %}{% endif %}
|
||||
{% if vars.update({'hosts': vars['hosts'] + ' ' + (hostvars[h].get('ansible_ssh_host') or hostvars[h]['ansible_host'])}) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue