What formats can Ansible inventory files be written in?

Prepare for the Cisco Certified DevNet Associate Exam. Use flashcards and multiple choice questions to boost your knowledge, with hints and explanations to guide you. Ace your exam effectively!

Ansible inventory files can be written in either INI or YAML format, making this the correct choice.

The INI format is a straightforward way to specify lists of hosts and groups, utilizing a simple, text-based structure that organizes different hosts by grouping them. Each group can contain multiple hosts, making it easy to manage and categorize the systems you're working with.

On the other hand, the YAML format allows for more complex and hierarchical data structures, which can be beneficial when managing larger environments or when additional metadata is required. YAML supports various data types, including lists and dictionaries, thus providing more flexibility compared to INI.

Utilizing these formats allows users to choose between simplicity (INI) and extensibility (YAML), accommodating different use cases and preferences when defining inventory for Ansible playbooks.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy