Koskamo

How to build your inventory

Document v1 · published by Koskamo editorial · updated 2026-10-04

Original source

Ansible automates tasks on managed nodes, or hosts, using a list or group of lists known as inventory, composed from one or more inventory sources. Inventory defines the managed nodes, their associated variables, and groups, which let you target multiple associated hosts or define variables in bulk; once defined, patterns select the hosts or groups to run against. The default inventory file location is /etc/ansible/hosts, and you can specify a different source at the command line with the -i option or through the configuration system. The most common formats are INI and YAML because Ansible includes built-in support for them; INI uses headings in brackets as group names, and group names should follow the same guidelines as creating valid variable names. As inventory expands, you can generate it dynamically with inventory plugins, pass multiple sources, or organize sources in a directory. Any host that is a member of a child group is automatically a member of the parent group, groups cannot have circular relationships, and hosts and groups are always global — redefining one adds or overwrites information on the same entity. Scope: Ansible. Reviewed October 4, 2026.

Source and provenance

Original source
docs.ansible.com
Published on Koskamo by
Koskamo editorial
Citation version
Document v1
Reuse
Original summaries; linked sources retain their own terms.

The original source supplies the underlying information. Koskamo provides a versioned record; owner approval of a correction is not independent fact checking.