Quiz Entry - updated: 2026.10.30
What are the built-in inventory groups all and ungrouped?
Ansible always creates them: all contains every host in the inventory, ungrouped contains every host that belongs to no other group.
You never declare them, yet you can target them:
ansible all --list-hostslists the whole inventory. In the lab inventory with servera to serverd that gives four hosts.ansible ungrouped --list-hostsshows hosts that were listed outside any[group]section. When every host has a group, the answer is the warning "No hosts matched, nothing to do" andhosts (0).
So every host is always in at least two groups: all plus either ungrouped or one or more real groups. ungrouped is a handy sanity check: a host that shows up there was probably meant to be filed under a group and was forgotten.
Go deeper:
Default groups (official docs) โ
allandungrouped, and why every host belongs to at least two groups.