Set fact for run_results returns error when previous validation run is skipped

When validation run is skipped due the unfulfilled condition, run_results variable isn't created, so the set_fact cannot be set properly and returns error which can be interpreted as false negatives. Set_fact task must be corrected so it doesn't fail even if the variable run_results is empty.

Signed-off-by: Veronika Fisarova <vfisarov@redhat.com>
Change-Id: Ibb6bf62c0291e27da6b855d7836376a029233138
This commit is contained in:
Veronika Fisarova 2023-03-08 16:52:33 +01:00
parent ef9ccda96e
commit dec9846f74
1 changed files with 1 additions and 1 deletions

View File

@ -26,4 +26,4 @@
- name: set fact for run_results
ignore_errors: true
set_fact: result_failed=true
when: run_results.rc != expected_rc
when: run_results is defined and run_results.rc is defined and run_results.rc != expected_rc