-
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
include: fails during exception processing #12876
Comments
To save you some copy-and-pasting, here's the testcase as a git repository: |
The problem is here, in
If we are handling an exception, then of course |
@larsks I agree, I think we can remove that without an ill-effect. I believe the host would not hit the include task if it had failed already, so checking that there is not required. |
I do already have a complex include example in the # ansible-playbook -vv -i localhosts test_include.yml ^ Running this with those lines removed shows the output I'd expect, so I'll go ahead and commit that fix. |
Oh, sorry, I just sent in a PR for same. Feel free to ignore for yours... |
prior to this commit, an attempt to use the `include:` directive would fail in a `rescue:` or `always:` block if there were failures in the main block task list. Resolves ansible#12876.
Closing This TicketHi! We believe the above commit should resolve this problem for you. This will also be included in the next major release. If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved. Thank you! |
prior to this commit, an attempt to use the `include:` directive would fail in a `rescue:` or `always:` block if there were failures in the main block task list. Resolves ansible#12876.
Given a playbook like this:
Where
failing_tasklist.yml
looks like this:And
cleanup_tasklist.yml
looks like this:I would expect Ansible to run
cleanup_tasklist.yml
, but theresulting playbook run looks like this:
So while it is parsing the
include
statement in thealways
section, it doesn't appear to be running it. Thecleanup_tasklist.yml
tasklist is run if there are no failures in theblock:
tasks, e.g.:The text was updated successfully, but these errors were encountered: