From 9de4f4a9ba541fbe788cc00b315d44803231a626 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Thu, 30 Nov 2017 13:03:19 +0000 Subject: [PATCH] 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.. Replace _registered_var.results[::] with item and you get your conditional. Magic! Change-Id: I44acb420155d3bc09b271a4b2fa92b488aae4c89 --- tasks/tempest_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/tempest_install.yml b/tasks/tempest_install.yml index fb9f45e7..1d5008e5 100644 --- a/tasks/tempest_install.yml +++ b/tasks/tempest_install.yml @@ -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