Courseiva

One-At-A-Time Rolling Update with Ansible serial: 1

A team uses Ansible to update a web application across 10 servers with minimal downtime. Which playbook directive achieves one-at-a-time updates?

Quick Answer

serial: 1 is correct because it directly controls the batch size of a rolling update, the number of hosts Ansible processes in each pass through the play, and setting it to 1 forces every host to be handled individually, one at a time, rather than in groups. That matters here because the goal is one-at-a-time updates across the 10 servers with minimal downtime: with serial: 1, only a single server is ever mid-update at any given moment, meaning 9 out of 10 remain fully available to serve traffic while that one host works through its update, whatever tasks that involves. A higher serial value, like serial: 2 or serial: 25%, would still be a rolling update, but it would take multiple hosts offline simultaneously, which increases the capacity impact during the update even if it finishes faster overall. The keyword to focus on is serial itself - it is the setting that turns a normal playbook run, which by default hits every host at once, into a controlled, incremental rollout - and whenever a question specifies an exact number of hosts that should be updated per pass, the answer is going to be the serial value that matches that number.

⚠ Common exam trap

It's easy for candidates to confuse `serial` with `forks` or `throttle`, mistakenly thinking that limiting parallel connections (`forks: 1`) or task concurrency (`throttle: 1`) achieves the same sequential host behavior as `serial`, but only `serial` controls the batch size of hosts processed by the playbook.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

serial: 1

C is correct because the `serial: 1` directive in an Ansible playbook controls the number of hosts that are updated simultaneously. Setting `serial: 1` forces Ansible to execute the playbook on one host at a time, ensuring that the web application is updated sequentially across the 10 servers, which minimizes downtime by keeping the other 9 servers available during each individual update.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    run_once: true

    Why it's wrong here

    run_once executes the task on a single host only, leaving the other nine servers unpatched, which breaks the rolling update entirely. It is intended for one-off actions such as database migrations or cluster-wide notifications that must not repeat per host.

  • ✗

    delegate_to: localhost

    Why it's wrong here

    delegate_to: localhost runs the task on the control node rather than each managed host, so it cannot sequence host updates at all. It is tempting because delegation is genuinely used for tasks like API calls or certificate signing that must run once centrally, not for rolling host-by-host execution.

  • ✓

    serial: 1

    Why this is correct

    Setting serial to 1 makes Ansible run the play against a single host per batch, so only one of the ten servers restarts at a time. Remaining hosts keep serving traffic, satisfying the minimal-downtime constraint.

  • ✗

    throttle: 1

    Why it's wrong here

    Throttle caps concurrent workers for a task across hosts, but with the default linear strategy it limits parallel execution rather than forcing strict sequential completion. Throttle suits rate-limited APIs where only a few hosts may hit an endpoint simultaneously.

  • ✗

    forks: 10

    Why it's wrong here

    Setting `forks: 10` raises the number of parallel execution slots, so all ten hosts would be updated simultaneously — the opposite of one-at-a-time. Forks control concurrency across the inventory, not per-task batching. It would be correct when you want to accelerate a play across many hosts where simultaneous changes are safe.

About these practice questions

One of 392 original EX294 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on EX294

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. An administrator wants to update a web server fleet with minimal downtime. They need to update each server one at a time. Which Ansible playbook directive should be used?

easy
  • A.throttle: 1
  • B.forks: 1
  • ✓ C.serial: 1
  • D.max_fail_percentage: 0

Why C: The `serial: 1` directive in an Ansible playbook controls the batch size of hosts that are updated simultaneously. Setting it to 1 ensures that only one host is updated at a time, which minimizes downtime by allowing the rest of the fleet to remain available while each server is sequentially updated.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This EX294 practice question is part of Courseiva's free Red Hat certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the EX294 exam.