Skip to content

Commit

Permalink
Fail if in a rescue block
Browse files Browse the repository at this point in the history
  • Loading branch information
spetrosi committed Apr 12, 2024
1 parent 37cf730 commit 60c0351
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/tasks/assert_fail_on_s390x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@

- 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:
msg: "{{ ansible_failed_result }}"

0 comments on commit 60c0351

Please sign in to comment.