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
any_errors_fatal doesn't work when a remote host is unreachable in the given batch #82834
Comments
Files identified in the description: If these files are incorrect, please update the |
@kurzandras |
what? ansible-core 2.12 is still in use |
It might still be in use (people still use Ansible 1.9), but it's not supported and no longer receives bug or security fixes. 2.12 reached end of life 2023-05-22. The oldest currently supported version is 2.14, which will itself reach EOL in a couple of months (2024-05-20). |
Thank you for your answers! It is really a big problem for me, since I can not upgrade due to missing python dependencies. Could you please at least suggest any workarounds for the given issue? Any help is really appreciated! Thank you very much in advance! |
I believe this is a minimal reproducer: - hosts: unreachable_host,host1,host2
gather_facts: false
any_errors_fatal: true
serial:
- 1
tasks:
- command: "false" The first batch containing an unreachable host should fail the whole play but it continues on to the second batch, a reachable host, I am working on a fix. The issue seems to be that for ansible/lib/ansible/executor/playbook_executor.py Lines 202 to 207 in 56fa630
|
Fixes ansible#82834 ci_complete
Summary
It seems that any_errors_fatal is not always working as expected. If there is an unreachable host in the current batch the any_errors_fatal stops working completely:
It should have stopped the whole playbook because of on testhost1 the task failed.
Issue Type
Bug Report
Component Name
any_errors_fatal
Ansible Version
Configuration
OS / Environment
Ubuntu 22.04.2 LTS
WSL1
Steps to Reproduce
Expected Results
I expect that the playbook will stop the execution for the current batch in case of failures even though there is one or more unreachable hosts.
Actual Results
The playbook execution did not stop even though there was a failed task in the execution on the first 5 hosts. On testhost1 a task has failed, and testhost5 was unreachable and as a result the playbook did not stop. If there are no unreachable hosts in the given batch, it behaves correctly and stops in case of failures.
Code of Conduct
The text was updated successfully, but these errors were encountered: