How do you drive batch size from the outside without editing the playbook?
BeginnerProductionRolling Updates, Delegation and Safe Deployments
Answer
Template serial from a variable with a safe default, and let the pipeline or AWX survey set it.
- hosts: web
serial: "{{ rollout_batch | default('25%') }}"
ansible-playbook deploy.yml -e rollout_batch=1 # careful, one at a time
ansible-playbook deploy.yml -e rollout_batch=100% # emergency, everything at once
Operators get a safe default and an escape hatch for emergencies or for a cautious first production rollout.
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