constructed inventory plugin
A built-in inventory plugin that creates groups and variables from attributes of hosts already in the inventory.
In more detail
It names no hosts of its own; it is a transformation layered over other sources, so it must be passed after them. keyed_groups makes a group per distinct attribute value, and strict: false means a host missing the attribute is skipped rather than failing the run.
Example
ansible-inventory -i inventory -i constructed.yml --graphRelated terms
- 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.
- inventory plugin — A plugin that builds inventory from a source such as a cloud account, configured with a small YAML file rather than written as a program.
- dynamic inventory — An inventory produced at run time by a program or plugin, usually by asking a cloud provider, instead of a file maintained by hand.
Taught in
- Dynamic Inventory — Ansible Configuration Management at Scale