mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 22:30:22 -07:00
Store invocation differently from an API perspective, but hide in callbacks
This commit is contained in:
parent
1ca6335323
commit
bf92a9e4e0
2 changed files with 15 additions and 2 deletions
|
@ -573,7 +573,6 @@ class Runner(object):
|
|||
else:
|
||||
result = self._execute_async_module(conn, tmp, module_name, inject=inject)
|
||||
|
||||
result.result['module'] = self.module_name
|
||||
if result.is_successful() and 'daisychain' in result.result:
|
||||
self.module_name = result.result['daisychain']
|
||||
if 'daisychain_args' in result.result:
|
||||
|
@ -584,7 +583,6 @@ class Runner(object):
|
|||
self.module_name = prev_module_name
|
||||
self.module_args = prev_module_args
|
||||
|
||||
result2.result['module'] = self.module_name
|
||||
changed = False
|
||||
if result.result.get('changed',False) or result2.result.get('changed',False):
|
||||
changed = True
|
||||
|
@ -604,6 +602,12 @@ class Runner(object):
|
|||
data = result.result
|
||||
if 'item' in inject:
|
||||
result.result['item'] = inject['item']
|
||||
|
||||
result.result['invocation'] = dict(
|
||||
module_args=self.module_args,
|
||||
module_name=self.module_name
|
||||
)
|
||||
|
||||
if is_chained:
|
||||
# no callbacks
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue