Group organization
Host group organization makes it possible to organize hosts in groups based on role, geographical location, or data center location. In a parent and child structure, it is possible to set parent group variables and make the child group inherit them. To override parent group variables, individual hosts or child groups can have their own unique custom variables. This practice is more of an Ansible inventory management feature than for playbook coding, yet it is very important for multi-architecture configuration management.
As described in previous chapters, host variables can either be defined within the inventory or the playbook itself. But it is easier to manage when organized within the inventory files as group_vars
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access