diff --git a/tests/tasks/assert_fail_on_s390x.yml b/tests/tasks/assert_fail_on_s390x.yml index 591c858..16116a8 100644 --- a/tests/tasks/assert_fail_on_s390x.yml +++ b/tests/tasks/assert_fail_on_s390x.yml @@ -11,3 +11,9 @@ - name: End execution on s390x host to avoid failures in clean up meta: end_host + +# When this task file is included in a rescue block, and the above task is +# skipped, Ansible would report success considering that a failure was rescued +- name: Fail if in a rescue block + when: ansible_failed_result is defined + fail: