RedHat EX407 Exam
Red Hat Certified Specialist in Ansible Automation exam (Page 2 )

Updated On: 7-Feb-2026

Examine the following inventory excerpt file named /home/user/ansible/inventory. [dbservers] db1.example.com

Which of the following files does Ansible check for variables related to that inventory? (Choose all that apply.)

  1. /home/user/ansible/dbservers
  2. /home/user/ansible/host_vars/db1.example.com
  3. /home/user/ansible/host_vars/db1
  4. /home/user/ansible/group_vars/dbservers

Answer(s): B,D

Explanation:

Ansible will check in /home/user/ansible/host_vars to find files named after hosts defined in the inventory. Ansible will check this file because there is a group defined in the inventory as dbservers.



Which flags must be accepted as input for a dynamic inventory script?

  1. Only --list
  2. --host [hostname] and --list
  3. --host [hostname] and --inv-list
  4. --list and --format [file format]

Answer(s): B



A dynamic inventory must return data in what format?

  1. JSON
  2. XML
  3. YAML
  4. INI

Answer(s): A

Explanation:

Dynamic inventories must return JSON output.



Which is the default inventory file used by Ansible?

  1. ${PWD}/.inventory
  2. /etc/hosts
  3. /etc/ansible/inventory
  4. /etc/ansible/hosts

Answer(s): D

Explanation:

Ansbile refers to /etc/ansible/hosts as the default inventory.



Observe the details of the following dynamic inventory file.

$ ls -l dynamic.py -rw-rw-r--. 1 user user 1928 Mar 30 08:21 dynamic.py

Why will this inventory file cause the ansible command to fail?

  1. Ansible cannot use python scripts as inventories.
  2. The ansible user must own the file.
  3. The file is not executable.
  4. The ansible command will not fail using the noted file with the given details.

Answer(s): C

Explanation:

Without being executable. Ansible will attempt to parse the script as a static inventory and fail.



Viewing page 2 of 22
Viewing questions 6 - 10 out of 101 questions



Post your Comments and Discuss RedHat EX407 exam prep with other Community members:

Join the EX407 Discussion