Interview Prep/Ansible/Vault, Performance and Execution Behaviour

The rolling deploy stops after the second batch with `NO MORE HOSTS LEFT`

IntermediateTroubleshootingVault, Performance and Execution Behaviour
Answer

Likely causes → Every host in the batch failed, or max_fail_percentage was exceeded, or any_errors_fatal: true was triggered. Ansible then ends the play, and later batches never start. That is intentional.

Diagnose → Scroll up to the first fatal: in the failing batch, and check the PLAY RECAP for failed= and unreachable=.

Fix → Fix the cause on the failed hosts, then continue with only the hosts that are not yet updated:

ansible-playbook deploy.yml --limit 'app:!app-0[1-4]'

Prevent → Add a health check at the end of each batch so a bad release stops early. Write deploys so that a re-run on already-updated hosts is a no-op.

All Ansible questions Roadmap: Ansible

More on Vault, Performance and Execution Behaviour