Automation · Inventory
Groups
Cheat sheet · https://pcornel.dk/topic.php?topic=5843
Answer
Inventory groups organize hosts by role, environment, site or platform, such as webservers or prod, so automation targets and variables apply to many hosts at once.
Remember
- Groups organize hosts by role, environment or site.
- Groups can be nested.
- Group variables apply to all members.
First checks
ansible-inventory --graph— group tree- Groups by role, site, environment — dimensions
- Nested groups — hierarchy
Verify in this order
hosts → groups → plays/vars
Where it usually breaks
Inventory/vars → play/task selection → connection/become → module request → module result → target object read-back → handler/service effective state → workload verification.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5843