Pass the correct object to local module check
The normal action plugin was passing module_name when the code path actually needed the module object itself. Change-Id: Idb8968a7020ffb159d0d016b5bfab6bd88219c70
This commit is contained in:
parent
1b22179d20
commit
cee3fc7dd1
|
@ -50,7 +50,7 @@ class ActionModule(normal.ActionModule):
|
|||
handler_name = 'handle_{action}'.format(action=self._task.action)
|
||||
handler = getattr(self, handler_name, None)
|
||||
if handler:
|
||||
paths._fail_if_local_module(self._task.action)
|
||||
paths._fail_if_local_module(self)
|
||||
handler()
|
||||
return True
|
||||
return False
|
||||
|
|
|
@ -91,7 +91,7 @@ def _fail_module_dict(module_name):
|
|||
name=module_name))
|
||||
|
||||
|
||||
def _fail_if_local_module(module_name):
|
||||
if not _is_official_module(module_name):
|
||||
msg_dict = _fail_module_dict(module_name)
|
||||
def _fail_if_local_module(module):
|
||||
if not _is_official_module(module):
|
||||
msg_dict = _fail_module_dict(module._task.action)
|
||||
raise AnsibleError(msg_dict['msg'])
|
||||
|
|
Loading…
Reference in New Issue