Skip to content
Snippets Groups Projects
Commit b4327fdc authored by Vladimir Rutsky's avatar Vladimir Rutsky
Browse files

handle both 'ansible_host' and 'ansible_ssh_host' in bastion configuration

'absible_ssh_host' is deprecated in Ansible 2.0 and at least
'contrib/inventory_builder/inventory.py' uses 'ansible_host' instead.
parent ae66b6e6
No related branches found
No related tags found
No related merge requests found
......@@ -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 %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment