Courseiva

200-901 Infrastructure and Automation Practice Question

An engineer uses Ansible to push a configuration change to 100 switches. The playbook fails on 5 switches. What is the most efficient way to apply the change only to those 5?

⚠ Common exam trap

Cisco often tests the distinction between host-level filtering (`--limit`) and task-level filtering (`--tags`/`--skip-tags`), leading candidates to confuse `--skip-tags` as a way to skip hosts instead of tasks.

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

✓

Use Ansible's --limit with the retry file

Ansible generates a retry file by default when a playbook fails on some hosts. Using `--limit @<retry-file>` re-runs the playbook only against the failed hosts, avoiding unnecessary execution on the 95 successful switches. This is the most efficient method because it targets only the problematic devices without manual intervention or full re-runs.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Use Ansible's --limit with the retry file

    Why this is correct

    Ansible writes failed hosts to a retry file, and --limit accepts that file to target only those hosts. This satisfies the requirement to reapply the change to the five failed switches without rerunning the playbook against all 100.

  • ✗

    Use --skip-tags on successful hosts

    Why it's wrong here

    --skip-tags filters tasks by tag, not hosts; it cannot select the 5 failed switches, and successful hosts would still be targeted. It tempts because tag filtering feels like host selection, but the correct approach limits the play to failed hosts via a retry file or --limit.

  • ✗

    Re-run the playbook on all switches

    Why it's wrong here

    Re-running against all 100 switches reapplies changes to the 95 already-configured devices, risking duplicate configuration and wasted runtime. It tempts because idempotent modules make full re-runs harmless in simple cases, but the stem asks specifically to target only the 5 failed hosts.

  • ✗

    Manually configure the 5 switches

    Why it's wrong here

    Manually configuring five switches discards Ansible's inventory and idempotency, risking drift and typos, and does not scale. It tempts when only a handful of hosts remain. The efficient route is re-running the playbook against a limited inventory or retry file containing just those five hosts.

About these practice questions

Courseiva writes every 200-901 question from scratch — 975 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 practice question is part of Courseiva's free Cisco 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 200-901 exam.