Red Hat Certified Specialist in Ansible Automation — Question 7

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.)

Answer options

Correct answer: B, D

Explanation

The correct answers are B and D because Ansible uses the host_vars directory to look for variables specific to the host db1.example.com and the group_vars directory for variables related to the dbservers group. Options A and C are incorrect as they do not conform to Ansible's variable file structure for hosts and groups.