mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 22:51:23 -07:00
Namespaced facts fixes (#26615)
* shorten warning on reservd fact collision also remove ansible_ from namespaced facts for vars manager handle str conversion errors use tuple to avoid iterator errors version added added * only modify final one * removed ansible_ removal
This commit is contained in:
parent
f51d607f25
commit
a5007f2f88
4 changed files with 25 additions and 18 deletions
|
@ -566,9 +566,7 @@ class TaskExecutor:
|
|||
return failed_when_result
|
||||
|
||||
if 'ansible_facts' in result:
|
||||
if not C.NAMESPACE_FACTS:
|
||||
vars_copy.update(result['ansible_facts'])
|
||||
vars_copy.update({'ansible_facts': result['ansible_facts']})
|
||||
vars_copy.update(result['ansible_facts'])
|
||||
|
||||
# set the failed property if it was missing.
|
||||
if 'failed' not in result:
|
||||
|
@ -614,9 +612,7 @@ class TaskExecutor:
|
|||
variables[self._task.register] = wrap_var(result)
|
||||
|
||||
if 'ansible_facts' in result:
|
||||
if not C.NAMESPACE_FACTS:
|
||||
variables.update(result['ansible_facts'])
|
||||
variables.update({'ansible_facts': result['ansible_facts']})
|
||||
variables.update(result['ansible_facts'])
|
||||
|
||||
# save the notification target in the result, if it was specified, as
|
||||
# this task may be running in a loop in which case the notification
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue