-
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
Debug task is run even though dependent task is skipped #13161
Comments
I think I see the problem. The 'success' filter uses the 'failed' filter, which explicitly looks for 'rc' or 'failed' fields, and otherwise assumes success. The "empty" dict from a skipped resource has neither, so is considered successful. |
I also tried changing the
The next attempt that checks for a specific field inside the registered variable actually seemed to work:
|
discussing in core if we should switch success to be 'not failed and not skipped' |
if you want to test the possible patch:
|
That patch results in the debug task being skipped (as expected) with |
also backported fix to stable-1.9, jic there ever is a 1.9.5 |
I found a case in ansible 1.9.4 (also present in 1.9.2) where a debug task with
when: whatever|success
runs even though the task that registerswhatever
was skipped.I was able to reproduce with this playbook:
which results in the following output:
The text was updated successfully, but these errors were encountered: