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.

All Ansible questions Roadmap: Ansible

More on Inventory