the option “any_errors_fatal” on a block level should (if a single node fails) have all nodes to fail and then execute “rescue” in all nodes.
However, as per my testing I can see that that the rescue block is only executed on the failed node only not in all nodes. I think that the proper behaviour should be that the resuce block is executed on all the nodes in order to implement a rollback behaviour.
This issue has been raised before as per this thread and i should be working since ansible 2.0 but with Ansible 2.7 that i am testing with this is not happening.
The playbook and output is as shown below
inventroy:
h1 ansible_connection=local
h2 ansible_connection=local
h3 ansible_connection=local
h4 ansible_connection=local
h5 ansible_connection=local
Playbook: