mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-09-21 00:42:56 +02:00
fix: call init_plugin_loader to fix module loading during module arg parse
This commit is contained in:
parent
6bde8f1437
commit
b70c64d795
|
@ -69,7 +69,8 @@ def ansible_template(basedir, varname, templatevars, **kwargs):
|
||||||
try:
|
try:
|
||||||
from ansible.plugins import module_loader
|
from ansible.plugins import module_loader
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from ansible.plugins.loader import module_loader
|
from ansible.plugins.loader import init_plugin_loader, module_loader
|
||||||
|
init_plugin_loader()
|
||||||
|
|
||||||
LINE_NUMBER_KEY = "__line__"
|
LINE_NUMBER_KEY = "__line__"
|
||||||
FILENAME_KEY = "__file__"
|
FILENAME_KEY = "__file__"
|
||||||
|
@ -411,7 +412,7 @@ def normalize_task(task, filename, custom_modules=None):
|
||||||
try:
|
try:
|
||||||
action, arguments, normalized["delegate_to"] = mod_arg_parser.parse()
|
action, arguments, normalized["delegate_to"] = mod_arg_parser.parse()
|
||||||
except AnsibleParserError as e:
|
except AnsibleParserError as e:
|
||||||
raise LaterAnsibleError("syntax error", e) from e
|
raise LaterAnsibleError(e) from e
|
||||||
|
|
||||||
# denormalize shell -> command conversion
|
# denormalize shell -> command conversion
|
||||||
if "_uses_shell" in arguments:
|
if "_uses_shell" in arguments:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user