keyed group
An inventory plugin setting that creates one group for each distinct value of a host attribute, named from a prefix and the value.
In more detail
With key: role and prefix: role, hosts whose role is web land in role_web. In a cloud the attributes are usually tags, so tagging instances consistently makes the inventory group itself. A host can appear in several keyed groups at once.
Related terms
- constructed inventory plugin — A built-in inventory plugin that creates groups and variables from attributes of hosts already in the inventory.
- aws_ec2 inventory plugin — The inventory plugin from the amazon.aws collection that lists EC2 instances in an AWS account as Ansible hosts.
- resource tag — A key and value label, such as Role=web or Environment=production, attached to a cloud resource to describe it.
- 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.
Taught in
- Dynamic Inventory — Ansible Configuration Management at Scale