all and ungrouped groups
The two groups every inventory has automatically: all contains every host, and ungrouped contains hosts that belong to no other group.
In more detail
You never need to declare them, though a YAML inventory usually starts from all explicitly. Variables in group_vars/all apply to every host and lose to any more specific group. When dynamic groups give every host a home, ungrouped becomes empty.
Related terms
- group — A named set of hosts in an inventory, used both to target them together and to attach variables that are true of all of them.
- group_vars — A directory whose files hold variables for inventory groups, one file or folder per group, named exactly after the group.
- inventory — The list of hosts Ansible may manage, arranged into groups and optionally carrying variables for each host or group.
Taught in
- Ansible Architecture And The Control Node — Ansible Configuration Management at Scale
- The Static Inventory File — Ansible Configuration Management at Scale
- Host Groups And Host Variables — Ansible Configuration Management at Scale
- Dynamic Inventory — Ansible Configuration Management at Scale
- Static Inventories: Hosts, Groups And Groups Of Groups — RHCE in Ansible (EX294): Automate Red Hat Systems
- Inventory Variables: Ranges, group_vars And host_vars — RHCE in Ansible (EX294): Automate Red Hat Systems
- Variables And Where They Win: group_vars, host_vars And Play Vars — RHCE in Ansible (EX294): Automate Red Hat Systems