mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix invocation from bad merge and note where it would need to go to keep
it out of registered vars as well.
This commit is contained in:
parent
25e3fe04a8
commit
92dd563a75
2 changed files with 8 additions and 5 deletions
|
@ -412,6 +412,12 @@ class TaskExecutor:
|
||||||
# do the final update of the local variables here, for both registered
|
# do the final update of the local variables here, for both registered
|
||||||
# values and any facts which may have been created
|
# values and any facts which may have been created
|
||||||
if self._task.register:
|
if self._task.register:
|
||||||
|
### FIXME:
|
||||||
|
# If we remove invocation, we should also be removing _ansible*
|
||||||
|
# and maybe ansible_facts.
|
||||||
|
# Remove invocation from registered vars
|
||||||
|
#if 'invocation' in result:
|
||||||
|
# del result['invocation']
|
||||||
variables[self._task.register] = result
|
variables[self._task.register] = result
|
||||||
|
|
||||||
if 'ansible_facts' in result:
|
if 'ansible_facts' in result:
|
||||||
|
|
|
@ -68,11 +68,8 @@ class CallbackBase:
|
||||||
keep_invocation = False
|
keep_invocation = False
|
||||||
else:
|
else:
|
||||||
keep_invocation = True
|
keep_invocation = True
|
||||||
if not keep_invocation and 'invocation' in result:
|
|
||||||
del abridged_result['invocation']
|
|
||||||
|
|
||||||
# remove invocation info unless its very very verbose
|
if not keep_invocation and 'invocation' in result:
|
||||||
if 'invocation' in abridged_result and self._display.verbosity < 3:
|
|
||||||
del abridged_result['invocation']
|
del abridged_result['invocation']
|
||||||
|
|
||||||
return json.dumps(abridged_result, indent=indent, ensure_ascii=False, sort_keys=sort_keys)
|
return json.dumps(abridged_result, indent=indent, ensure_ascii=False, sort_keys=sort_keys)
|
||||||
|
|
Loading…
Reference in a new issue