What happens to a rollout if a host fails halfway, and how do you resume?
BeginnerProductionRolling Updates, Delegation and Safe Deployments
Answer
The failed host is dropped from the rest of the play, the other hosts in the batch continue, and the failure counts toward max_fail_percentage. Hosts that already finished remain updated, which is why the plays must be idempotent and safe to re-run.
Fix the cause, then re-run only the failed hosts: ansible-playbook deploy.yml --limit @deploy.retry (when retry files are enabled) or by name. AWX offers "relaunch on failed hosts". Resume does not need special logic if each host's change is idempotent.
More on Rolling Updates, Delegation and Safe Deployments
How do you do a rolling update with Ansible?BeginnerWhat forms can `serial` take?IntermediateShow the standard pattern for a zero-downtime rolling deploy behind a load balancer.IntermediateWhy do you add a health check inside the deployment play?BeginnerHow do `any_errors_fatal` and `max_fail_percentage` help a rollout?BeginnerHow do you do a canary deployment?Intermediate