Courseiva

EX294 Manage task execution and roles Practice Question

Which directive in an Ansible playbook ensures that a task runs only on the first host in a batch, and results are applied to all hosts?

⚠ Common exam trap

EX294 often tests the distinction between run_once and other execution control directives like throttle and any_errors_fatal, and candidates may confuse run_once with delegate_to when both are used together.

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

✓

run_once

The run_once directive ensures that a task is executed only on the first host in the current batch of hosts. The results of that task are then applied to all hosts in the play. This is useful for tasks that should only be performed once, such as database migrations or generating a shared token, while still making the outcome available to all hosts.

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

    Why this is correct

    `run_once` executes the task on a single host — the first in the batch — while its results are applied to every host in the play. This satisfies the stem's constraint of limiting execution to one host yet propagating outcomes to all, avoiding redundant operations across the batch.

  • ✗

    any_errors_fatal

    Why it's wrong here

    any_errors_fatal aborts the entire play for all hosts when any host fails a task; it governs failure handling, not execution scope. It suits fail-fast orchestration where partial completion is unacceptable. run_once is the directive that executes on one host and applies results to every host.

  • ✗

    throttle

    Why it's wrong here

    throttle limits how many hosts execute a task concurrently; it does not restrict execution to the first host or share results. It suits rate-limiting API calls or rolling updates across large inventories. run_once is the directive that executes a task on a single host and applies its results to all hosts.

  • ✗

    delegate_to: localhost

    Why it's wrong here

    delegate_to: localhost runs the task on the control node, not on the first managed host, and does not propagate results to others. It suits tasks needing local API calls or file generation. The run_once directive, paired with delegation, is what executes once and applies results across all hosts.

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

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Red Hat exam blueprint

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.