mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Mimic the direct call of the module to reuse internal arg parsing
This commit is contained in:
parent
56cd42e55d
commit
7239180c82
@ -67,7 +67,7 @@ class AnsibleState(object):
|
||||
for mod_name, mod_params in kwargs.items():
|
||||
args, kwargs = self.get_args(mod_params)
|
||||
try:
|
||||
ans_mod_out = __salt__['ansible.{0}'.format(mod_name)](*args, **kwargs)
|
||||
ans_mod_out = __salt__['ansible.{0}'.format(mod_name)](**{'__pub_arg': [args, kwargs]})
|
||||
except Exception as err:
|
||||
ans_mod_out = 'Module "{0}" failed. Error message: ({1}) {2}'.format(
|
||||
mod_name, err.__class__.__name__, err)
|
||||
|
Loading…
Reference in New Issue
Block a user