summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/__init__.py
diff options
context:
space:
mode:
authorMatt Davis <nitzmahone@users.noreply.github.com>2017-07-18 20:44:01 -0700
committerGitHub <noreply@github.com>2017-07-18 20:44:01 -0700
commit907b662dc6bd39cf7c1a5940eb79d16dd593adeb (patch)
treec775e4f6ac27600b8c5e0e6f0a10123c60f345e2 /lib/ansible/plugins/__init__.py
parent37e757286dade76b0305667d508114d6387c6a3d (diff)
downloadansible-907b662dc6bd39cf7c1a5940eb79d16dd593adeb.tar.gz
Powershell module_utils loader and tests (#26932)
* supports custom module_utils loads (anything in module prefaced with `#Requires -Module Ansible.ModuleUtils.*`) * supports all usual PluginLoader module_utils locations (built-in lib/ansible/module_utils/, custom path from config, playbook module_utils/, ~/.ansible/module_utils, role module_utils, etc), * moves Powershell module_utils from module_utils/powershell.ps1 to module_utils/powershell/Ansible.ModuleUtils.PowerShellLegacy.psm1
Diffstat (limited to 'lib/ansible/plugins/__init__.py')
-rw-r--r--lib/ansible/plugins/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/ansible/plugins/__init__.py b/lib/ansible/plugins/__init__.py
index d9ab31c072..97dcc5134f 100644
--- a/lib/ansible/plugins/__init__.py
+++ b/lib/ansible/plugins/__init__.py
@@ -500,6 +500,15 @@ module_utils_loader = PluginLoader(
'module_utils',
)
+# NB: dedicated loader is currently necessary because PS module_utils expects "with subdir" lookup where
+# regular module_utils doesn't. This can be revisited once we have more granular loaders.
+ps_module_utils_loader = PluginLoader(
+ '',
+ 'ansible.module_utils',
+ C.DEFAULT_MODULE_UTILS_PATH,
+ 'module_utils',
+)
+
lookup_loader = PluginLoader(
'LookupModule',
'ansible.plugins.lookup',