-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ansible_failed_task is not working reliably with inner blocks #43191
Labels
affects_2.7
This issue/PR affects Ansible v2.7
affects_2.11
affects_2.13
bug
This issue/PR relates to a bug.
has_pr
This issue has an associated PR.
P3
Priority 3 - Approved, No Time Limitation
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
Comments
Files identified in the description: If these files are inaccurate, please update the |
ansibot
added
affects_2.7
This issue/PR affects Ansible v2.7
bug
This issue/PR relates to a bug.
needs_triage
Needs a first human triage before being processed.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
labels
Jul 24, 2018
Merged
jborean93
removed
the
needs_triage
Needs a first human triage before being processed.
label
Jul 26, 2018
mkrizek
added a commit
to mkrizek/ansible
that referenced
this issue
Oct 26, 2020
mkrizek
added a commit
to mkrizek/ansible
that referenced
this issue
Dec 11, 2020
Rather then trying to iterate states to figure out whether the next task will be in a rescue portion of the block and if so set ansible_failed_task/ansible_failed_result variables, we could just look if rescue portion of the block exists in any block from top down to the most nested one. That way we do not have to handle various corner cases where iterating to next task would end up in an always section but rescue section would be in an outer block and we would fail to set the variable. Fixes ansible#43191
mkrizek
added a commit
to mkrizek/ansible
that referenced
this issue
Dec 11, 2020
Rather then trying to iterate states to figure out whether the next task will be in a rescue portion of the block and if so set ansible_failed_task/ansible_failed_result variables, we could just look if rescue portion of the block exists in any block from top down to the most nested one. That way we do not have to handle various corner cases where iterating to next task would end up in an always section but rescue section would be in an outer block and we would fail to set the variable. Fixes ansible#43191 ci_complete
mkrizek
added a commit
to mkrizek/ansible
that referenced
this issue
Jan 27, 2021
Rather then trying to iterate states to figure out whether the next task will be in a rescue portion of the block and if so set ansible_failed_task/ansible_failed_result variables, we could just look if rescue portion of the block exists in any block from top down to the most nested one. That way we do not have to handle various corner cases where iterating to next task would end up in an always section but rescue section would be in an outer block and we would fail to set the variable. Fixes ansible#43191 ci_complete
mkrizek
added a commit
to mkrizek/ansible
that referenced
this issue
Nov 12, 2021
Rather then trying to iterate states to figure out whether the next task will be in a rescue portion of the block and if so set ansible_failed_task/ansible_failed_result variables, we could just look if rescue portion of the block exists in any block from top down to the most nested one. That way we do not have to handle various corner cases where iterating to next task would end up in an always section but rescue section would be in an outer block and we would fail to set the variable. Fixes ansible#43191 ci_complete
mkrizek
added a commit
to mkrizek/ansible
that referenced
this issue
Aug 31, 2022
Fixes ansible#43191 Fixes ansible#72638 ci_complete
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.7
This issue/PR affects Ansible v2.7
affects_2.11
affects_2.13
bug
This issue/PR relates to a bug.
has_pr
This issue has an associated PR.
P3
Priority 3 - Approved, No Time Limitation
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
SUMMARY
When using blocks inside other blocks, variable
ansible_failed_task
is not propagated reliably.ISSUE TYPE
COMPONENT NAME
core engine
ANSIBLE VERSION
CONFIGURATION
stock configuration
OS / ENVIRONMENT
Linux
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: