From f865af4563662c6b83568d938845b64f54e03dde Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Mon, 17 May 2021 07:54:35 +0000 Subject: [PATCH] Fix inspecting refstack_result refstack_result is used to register result of running refstack-client, however, it was used in 2 different tasks one of which was always skipped. There may happen a situation (when the latter task is skipped), the skipped task overrides the result of the refstack-client execution from the other task. The patch fixes that by using a different variable for each of the tasks running refstack-client. Change-Id: I6f524df674dfbb2d6b9372dce51f1e1aec8ed9be --- tasks/main.yaml | 4 ++-- tasks/run-refstack-client.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yaml b/tasks/main.yaml index 23b9f1e..c673b7b 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -40,6 +40,6 @@ - name: Check if we passed tests of all specified target programs fail: msg: "Refstack tests failed." - # the refstack_result var got set in run-refstack-client.yaml + # the refstack_results var got set in run-refstack-client.yaml when: item.rc > 0 - with_items: "{{ refstack_result.results }}" + with_items: "{{ refstack_results.results }}" diff --git a/tasks/run-refstack-client.yaml b/tasks/run-refstack-client.yaml index 1741d50..4ad1f8b 100644 --- a/tasks/run-refstack-client.yaml +++ b/tasks/run-refstack-client.yaml @@ -44,9 +44,9 @@ args: chdir: "{{ refstack_client_source }}" executable: /bin/bash - register: refstack_result + register: refstack_results # don't fail here in order to allow post_tasks be executed, - # the refstack_result is inspected in the last task of the role where it + # the refstack_results is inspected in the last task of the role where it # fails if it failed here ignore_errors: true with_items: "{{ refstack_target_programs }}"