mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Revert "Check for ansible_facts in results for with_ tasks"
This reverts commit 1a4e6e415e.
This commit is contained in:
@@ -361,15 +361,8 @@ class PlayBook(object):
|
|||||||
|
|
||||||
# add facts to the global setup cache
|
# add facts to the global setup cache
|
||||||
for host, result in contacted.iteritems():
|
for host, result in contacted.iteritems():
|
||||||
if 'results' in result:
|
facts = result.get('ansible_facts', {})
|
||||||
# task ran with_ lookup plugin, so facts are encapsulated in
|
self.SETUP_CACHE[host].update(facts)
|
||||||
# multiple list items in the results key
|
|
||||||
for res in result['results']:
|
|
||||||
facts = res.get('ansible_facts', {})
|
|
||||||
self.SETUP_CACHE[host].update(facts)
|
|
||||||
else:
|
|
||||||
facts = result.get('ansible_facts', {})
|
|
||||||
self.SETUP_CACHE[host].update(facts)
|
|
||||||
# extra vars need to always trump - so update again following the facts
|
# extra vars need to always trump - so update again following the facts
|
||||||
self.SETUP_CACHE[host].update(self.extra_vars)
|
self.SETUP_CACHE[host].update(self.extra_vars)
|
||||||
if task.register:
|
if task.register:
|
||||||
|
|||||||
Reference in New Issue
Block a user