[FFU] Make sure group access work correctly with ansible 2.6.

Hi, with ansible 2.6 we cannot access the groups variable using the
previous idiom anymore.  Use a more robust way to access that
variable.

Co-Authored-By: "Lukas Bezdicka <lbezdick@redhat.com>"
Change-Id: I26f97e7fc4da0dd19e1e8a19b3f6a1c1160f7466
Closes-bug: #1816422
This commit is contained in:
Sofer Athlan-Guyot 2019-02-18 14:38:37 +01:00
parent afe1cb5581
commit a0c3612db8

View File

@ -834,7 +834,7 @@ outputs:
fast_forward_upgrade_bootstrap_role_tasks: | fast_forward_upgrade_bootstrap_role_tasks: |
{%- for role in roles %} {%- for role in roles %}
- include_tasks: {{role.name}}/fast_forward_upgrade_tasks.yaml - include_tasks: {{role.name}}/fast_forward_upgrade_tasks.yaml
when: tripleo_role_name == '{{role.name}}' and ansible_hostname == {{role.name}}[0] when: tripleo_role_name == '{{role.name}}' and ansible_hostname == groups['{{role.name}}'][0]
{%- endfor %} {%- endfor %}
post_update_steps_tasks: | post_update_steps_tasks: |
{%- for role in roles %} {%- for role in roles %}