> For the complete documentation index, see [llms.txt](https://notes.nomanaziz.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.nomanaziz.me/devops/infrastructure-as-a-code-iac/ansible/3.-inventory.md).

# 3. Inventory

* An inventory file classifies nodes into groups
* Default path is `/etc/ansible/hosts`

```
[webserver]
web1.machine ansible_host=4242 ansible_user=john
web2.machine
web3.machine

[databaseserver]
db1.machine
db2.machine
```
