Enable autoloading of inventory plugins (#32709)

* Automatically loads and executes an inventory plugin specified by a standard YAML inventory config file containing a `plugin` key at its root.
* Moved inventory PluginLoader to a shared global instance.
This commit is contained in:
Matt Davis 2017-11-09 16:38:34 -08:00 committed by ansibot
parent abc4210a33
commit 5ff36c3423
5 changed files with 67 additions and 5 deletions

View file

@ -582,3 +582,10 @@ netconf_loader = PluginLoader(
'netconf_plugins',
required_base_class='NetconfBase'
)
inventory_loader = PluginLoader(
'InventoryModule',
'ansible.plugins.inventory',
C.DEFAULT_INVENTORY_PLUGIN_PATH,
'inventory_plugins'
)