Add additional whitespace around "ansible_connection: local"

The jinja2 condition to look for "ansible_connection: local"
did not contain enough whitespace and resulted in an invalid
Ansible inventory. This patch adds the missing whitespace by
indenting the condition.

Change-Id: Ia114edafe6f1b37d6e6d47af146ab35adeb79efd
Closes-Bug: #1800148
This commit is contained in:
John Fulton 2018-10-28 11:06:20 -04:00
parent 03ca0e5d31
commit b201df7257

View File

@ -392,10 +392,10 @@ outputs:
{{ host }}:
ansible_user: {{ hostvars.raw_get(host)['ansible_ssh_user'] | default('root') }}
ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) }}
ansible_become: true
{% if hostvars.raw_get(host)['ansible_connection'] | default('') == 'local' -%}
{% if hostvars.raw_get(host)['ansible_connection'] | default('') == 'local' -%}
ansible_connection: local
{%- endif %}
{%- endif %}
ansible_become: true
{% endfor -%}
{%- endif -%}