What does `meta: end_batch` or `end_host` give you in rollouts?
BeginnerProductionRolling Updates, Delegation and Safe Deployments
Answer
They let a play stop part of its work without failing. end_host removes the current host from the rest of the play, for example when it is already on the target version. end_batch ends the current serial batch and moves to the next one. end_play stops everything cleanly.
- ansible.builtin.meta: end_host
when: installed_version == app_version
This keeps re-runs fast and avoids deeply nested when conditions on every task.
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