Common inventory file formats for Ansible include:
-
INI Format:
- A simple text format where hosts are grouped under headers.
[webservers] server1.example.com server2.example.com [databases] db1.example.com db2.example.com -
YAML Format:
- A more structured and human-readable format that supports complex inventories.
all: hosts: server1.example.com: server2.example.com: children: webservers: hosts: server1.example.com: server2.example.com:
