certslothcertsloth
EX294/Topic 01

Red Hat / Advanced

Inventory, Configuration and Execution Environments

2 min read5 recall promptsReviewed 2026-10-10

Memory hook: Know the targets, settings and runtime before the first task.

Must remember

An inventory identifies managed hosts and groups. Static INI or YAML inventories can assign connection information and group membership; group_vars and host_vars separate data from tasks. A host in multiple groups still represents one host, and conflicting variable definitions require deliberate precedence. Use host patterns and limits to select only the intended systems.

Ansible loads the first applicable configuration file in its search order: an explicit ANSIBLE_CONFIG, a suitable current-directory file, a home file, then the system file. Environment variables and other configuration categories can override settings. Do not assume all configuration files are merged. Inspect effective configuration and inventory rather than guessing from a file you edited.

An execution environment packages Ansible runtime, collections and dependencies in a container image. ansible-navigator.yml configures navigator behavior such as the chosen execution environment and execution options. The controller filesystem, mounted project directory and container filesystem are distinct; a collection installed only on the host may not exist inside the selected environment.

Use ansible-inventory --graph or the appropriate navigator inventory view to inspect targets. --list-hosts shows which hosts a play targets without configuring them. Confirm group names, inventory path, remote user and environment before execution. A syntactically valid empty inventory can produce a successful-looking run that configured nothing.

Version the intended project configuration and collection requirements, excluding secrets and transient artifacts. Prefer an explicit reproducible runtime over relying on whatever packages happen to be installed on a workstation.

Choose under exam pressure

Requirement Choice and reason
Select a subset for a controlled run Inventory group/pattern plus an intentional limit.
Find why a setting is ignored Inspect the loaded configuration and effective overrides.
Ensure consistent dependencies A specified execution environment and collection requirements.

Traps

  • Editing an unused ansible.cfg changes nothing.
  • Host-installed collections are not automatically available in a containerized runtime.

Active recall

1. Inventory versus playbook?

Target/connection data versus desired operations and state.

2. Are all ansible.cfg files merged?

No; Ansible selects the first applicable file, with other precedence categories still relevant.

3. Why inspect list-hosts?

To confirm the intended systems will actually be targeted.

4. What does an execution environment package?

The automation runtime and its dependencies/collections.

5. Why can a run do nothing without obvious task failure?

The host pattern may match no inventory hosts.

Sources

CLOSE THE NOTES. EXPLAIN THE CHOICE.

How well could you recall it?

Your next review is based on this answer. Progress stays in this browser.

Search across every published topic.