mediumMultiple SelectObjective-mapped
350-401 Practice Question: Which two statements about Ansible inventory…
Which two statements about Ansible inventory files are true? (Choose two.)
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
✓
Ansible can use a dynamic inventory script that queries an external source such as AWS EC2.
Ansible inventory files can be static (INI/YAML) or dynamic (script or plugin). The default location is /etc/ansible/hosts. INI format uses [group] headers and YAML uses a structured hierarchy. Dynamic inventories pull from external sources like cloud APIs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Ansible can use a dynamic inventory script that queries an external source such as AWS EC2.
Why this is correct
Correct because dynamic inventory scripts allow Ansible to retrieve host information from external sources like cloud providers.
- ✓
The default location for the Ansible inventory file is /etc/ansible/hosts.
Why this is correct
Correct because the default inventory file path is /etc/ansible/hosts when no alternative is specified via -i or ansible.cfg.
- ✗
Ansible inventory files can only be written in INI format.
Why it's wrong here
Incorrect because Ansible supports both INI and YAML formats for inventory files.
- ✗
Group variables in an inventory must be defined in separate files under the group_vars directory.
Why it's wrong here
Incorrect because group variables can be defined inline in the inventory file (e.g., [group:vars]) or in separate group_vars files.
- ✗
The inventory file can only contain hostnames, not IP addresses.
Why it's wrong here
Incorrect because inventory files can contain either hostnames or IP addresses.
Go deeper
Related to this question
About these practice questions
This 350-401 question is part of Courseiva's 1,175-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 350-401 practice question is part of Courseiva's free Cisco 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 350-401 exam.