CertGrid CertGrid
Hands-on Lab·Ansible

Ansible forks, serial and Rolling Changes

`forks` and `serial` both control parallelism and they are not the same thing. Forks is how many hosts Ansible works on simultaneously; serial splits the play into batches that each complete fully before the next begins. That difference is what turns a play into a rolling deployment, and it is visible in the output.

Scale and Debugging Guide 37 of 45 Intermediate

Written against the versions above. `serial` accepts a number, a percentage (`serial: 25%`) or a list (`serial: [1, 5, 10]`) for a canary batch followed by progressively larger ones. Combined with `max_fail_percentage` it is how a large rollout is made safe - stop after the first batch if too much of it fails.

Both managed nodes. Every effect in this guide needs more than one host to be visible.
Server NameIP AddressOSRolesCPURAMHDD
ANS-CTL01192.168.0.36Ubuntu 26.04 LTSAnsible Control Node2 Core3 GB50 GB
ANS-A01192.168.0.37Ubuntu 26.04 LTSManaged Node (group: web)2 Core3 GB50 GB
ANS-B01192.168.0.38Ubuntu 26.04 LTSManaged Node (group: db)2 Core3 GB50 GB

Before you start

  1. The configuration this guide assumes

  2. forks is how many hosts at once

  3. serial turns one play into batches

  4. run_once and delegate_to

  5. Throttling one task

Official sources