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.
In more detail
The file's plugin key names it, and its other keys say what to fetch and how to group it. Plugins get caching, validation, consistent authentication and group building such as keyed groups. Many require a particular file name ending, such as aws_ec2.yml, so Ansible knows which plugin to use.
Related terms
- 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.
- inventory script — An executable program that prints the inventory as JSON when Ansible runs it with --list, and one host's variables with --host.
- 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.
- 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.
Taught in
- Dynamic Inventory — Ansible Configuration Management at Scale