Fix tempest plugins installation

The conditional was wrong, and therefore always skipped.
When you have registered the output of with items, you get the
whole list in _registered_var.results.

Each item is the result itself, and for convenience, ansible
throws in the original item under the dict "item".

So here original item's repo in the results should be in
_registered_var.results[0].item.repo while the stat of the folder
should be in _registered_var.results[0].stat.<whatever>.

Replace _registered_var.results[::] with item and you get your
conditional. Magic!

Change-Id: I44acb420155d3bc09b271a4b2fa92b488aae4c89
This commit is contained in:
Jean-Philippe Evrard 2017-11-30 13:03:19 +00:00
parent 9cb630feac
commit 9de4f4a9ba
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@
{{ pip_install_options | default('') }}
with_items: "{{ _test_requirements_stat.results }}"
when:
- item.repo is defined
- "item.item.repo is defined"
- "item.stat.exists"
register: install_tempest_plugin_requirements
until: install_tempest_plugin_requirements | success