Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable-2.9] Ensure task from the worker is finalized/squashed (#73881)…
… (#73929) * Ensure task from the worker is finalized/squashed. Fixes #57399. Fixes #49942 (cherry picked from commit 832631b) Co-authored-by: Matt Martz <matt@sivel.net>
- Loading branch information
Showing
4 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
bugfixes: | ||
- Strategy - When building the task in the Strategy from the Worker, | ||
ensure it is properly marked as finalized and squashed. Addresses an | ||
issue with ``ansible_failed_task``. | ||
(https://github.com/ansible/ansible/issues/57399) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- hosts: localhost | ||
gather_facts: false | ||
tasks: | ||
- block: | ||
- include_role: | ||
name: '{{ item }}' | ||
loop: | ||
- fail | ||
rescue: | ||
- debug: | ||
msg: "{{ ansible_failed_task.name }}" | ||
|
||
- assert: | ||
that: | ||
- ansible_failed_task.name == "Fail" | ||
- ansible_failed_task.action == "fail" | ||
- ansible_failed_task.parent is not defined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- name: Fail | ||
fail: | ||
msg: fail |