What is the difference between an inventory plugin and an inventory script?
IntermediateConceptInventory
Answer
A script is an executable that must answer --list and --host <name> with JSON. It runs as a subprocess, with no built-in caching, no config validation and no Jinja2.
A plugin is a Python class loaded by Ansible, configured by a YAML file. It supports caching, keyed_groups, compose, groups expressions, filters and strict mode. Plugins are the supported path and are enabled in [inventory] enable_plugins.
More on Inventory
What is an inventory and why does Ansible need one?BeginnerWhat are the INI and YAML inventory formats and how do they differ?BeginnerHow do you create groups of groups?BeginnerExplain host patterns: `:`, `:&`, `:!` and wildcards.IntermediateWhich connection variables can you set per host in inventory?BeginnerWhat are `group_vars` and `host_vars` directories?Intermediate