Courseiva

EX294 Manage inventories and credentials Practice Question

Ansible Tower is configured with a dynamic inventory source from VMware vCenter. The playbook needs to limit execution to hosts with a specific custom attribute. How should this be achieved?

⚠ Common exam trap

It's easy for candidates to think they need to modify the inventory source or script to filter hosts, not realizing that Tower's smart inventories provide a built-in, non-destructive way to apply filters on top of any existing inventory source.

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 a smart inventory filter.

Smart inventories in Ansible Tower allow you to apply a filter (using Jinja2-style syntax) against an existing inventory source, such as a dynamic VMware vCenter source, to limit execution to hosts matching specific criteria like a custom attribute. This approach avoids modifying the source script or creating duplicate inventory sources, preserving the dynamic nature of the inventory while enabling targeted host selection.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Modify the VMware inventory script to filter hosts.

    Why it's wrong here

    Editing the VMware inventory script alters collection logic globally and is overwritten on upgrades, rather than filtering at execution. It is tempting because scripts define what hosts are gathered, and would be correct if the custom attribute were not exposed by the existing source and required custom collection.

  • ✓

    Use a smart inventory filter.

    Why this is correct

    Smart inventory filters let you define host criteria using facts and attributes, so the playbook runs only against vCenter hosts matching the custom attribute. A static group would not track the dynamic inventory source's changing membership.

  • ✗

    Add the required hosts manually.

    Why it's wrong here

    Manually adding hosts bypasses the dynamic vCenter source entirely, so the inventory no longer reflects live infrastructure and drifts as VMs change. It is tempting for a quick one-off run, and would be correct only for static hosts outside any dynamic inventory.

  • ✗

    Create a new inventory source with a filter.

    Why it's wrong here

    A second inventory source duplicates the vCenter connection and creates a separate inventory rather than limiting the existing one at run time. It is tempting because sources can carry filters, and would be correct if a distinct, permanently filtered inventory group were genuinely required.

About these practice questions

Courseiva writes every EX294 question from scratch — 392 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 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.