mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Prepare arguments for the module
This commit is contained in:
parent
a77b8b4204
commit
5cfc32f471
@ -124,8 +124,17 @@ def _set_callables(modules):
|
||||
'''
|
||||
Call an Ansible module as a function from the Salt.
|
||||
'''
|
||||
kwargs = {}
|
||||
if kw.get('__pub_arg'):
|
||||
for _kw in kw.get('__pub_arg', []):
|
||||
if isinstance(_kw, dict):
|
||||
kwargs = _kw
|
||||
break
|
||||
else:
|
||||
kw = {}
|
||||
|
||||
global _caller
|
||||
return _caller.call(cmd_name)
|
||||
return _caller.call(cmd_name, *args, **kwargs)
|
||||
_cmd.__doc__ = doc
|
||||
return _cmd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user