PrepAway - Latest Free Exam Questions & Answers

Which of the following files does Ansible check for variables related to that inventory?

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

A. /home/user/ansible/dbservers

B. /home/user/ansible/host_vars/db1.example.com

C. /home/user/ansible/host_vars/db1

D. /home/user/ansible/group_vars/dbservers

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.


Leave a Reply

Your email address will not be published. Required fields are marked *