fixes cliconf and netconf plugin loaders
This change updates the configuration and plugin loader objects for cliconf and netconf to pull be able to configure where to find the plugins.
This commit is contained in:
parent
4021194532
commit
d1ff03e84c
2 changed files with 20 additions and 2 deletions
|
@ -473,6 +473,15 @@ DEFAULT_CALLBACK_WHITELIST:
|
|||
- {key: callback_whitelist, section: defaults}
|
||||
type: list
|
||||
yaml: {key: plugins.callback.whitelist}
|
||||
DEFAULT_CLICONF_PLUGIN_PATH:
|
||||
name: Cliconf Plugins Path
|
||||
default: ~/.ansible/plugins/cliconf:/usr/share/ansible/plugins/cliconf
|
||||
description: Colon separated paths in which Ansible will search for Cliconf Plugins.
|
||||
env: [{name: ANSIBLE_CLICONF_PLUGINS}]
|
||||
ini:
|
||||
- {key: cliconf_plugins, section: defaults}
|
||||
type: pathspec
|
||||
yaml: {key: plugins.connection.path}
|
||||
DEFAULT_CONNECTION_PLUGIN_PATH:
|
||||
name: Connection Plugins Path
|
||||
default: ~/.ansible/plugins/connection:/usr/share/ansible/plugins/connection
|
||||
|
@ -800,6 +809,14 @@ DEFAULT_MODULE_UTILS_PATH:
|
|||
ini:
|
||||
- {key: module_utils, section: defaults}
|
||||
type: pathspec
|
||||
DEFAULT_NETCONF_PLUGIN_PATH:
|
||||
name: Netconf Plugins Path
|
||||
default: ~/.ansible/plugins/netconf:/usr/share/ansible/plugins/netconf
|
||||
description: Colon separated paths in which Ansible will search for Netconf Plugins.
|
||||
env: [{name: ANSIBLE_NETCONF_PLUGINS}]
|
||||
ini:
|
||||
- {key: cliconf_plugins, section: defaults}
|
||||
type: pathspec
|
||||
DEFAULT_NO_LOG:
|
||||
name: No log
|
||||
default: False
|
||||
|
|
|
@ -60,6 +60,7 @@ class PluginLoader:
|
|||
elif not config:
|
||||
config = []
|
||||
|
||||
import q; q(config)
|
||||
self.config = config
|
||||
|
||||
if class_name not in MODULE_CACHE:
|
||||
|
@ -644,7 +645,7 @@ vars_loader = PluginLoader(
|
|||
cliconf_loader = PluginLoader(
|
||||
'Cliconf',
|
||||
'ansible.plugins.cliconf',
|
||||
'cliconf_plugins',
|
||||
C.DEFAULT_CLICONF_PLUGIN_PATH,
|
||||
'cliconf_plugins',
|
||||
required_base_class='CliconfBase'
|
||||
)
|
||||
|
@ -652,7 +653,7 @@ cliconf_loader = PluginLoader(
|
|||
netconf_loader = PluginLoader(
|
||||
'Netconf',
|
||||
'ansible.plugins.netconf',
|
||||
'netconf_plugins',
|
||||
C.DEFAULT_NETCONF_PLUGIN_PATH,
|
||||
'netconf_plugins',
|
||||
required_base_class='NetconfBase'
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue