mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Register skipped tasks so we can at least check their changed/not-changed status.
This commit is contained in:
parent
7d302c42e6
commit
a81089231e
2 changed files with 2 additions and 5 deletions
|
@ -341,9 +341,6 @@ class PlayBook(object):
|
|||
|
||||
# add facts to the global setup cache
|
||||
for host, result in contacted.iteritems():
|
||||
# Skip register variable if host is skipped
|
||||
if result.get('skipped', False):
|
||||
continue
|
||||
facts = result.get('ansible_facts', {})
|
||||
self.SETUP_CACHE[host].update(facts)
|
||||
# extra vars need to always trump - so update again following the facts
|
||||
|
|
|
@ -462,7 +462,7 @@ class Runner(object):
|
|||
return ReturnData(host=host, comm_ok=all_comm_ok, result=rd_result)
|
||||
else:
|
||||
self.callbacks.on_skipped(host, None)
|
||||
return ReturnData(host=host, comm_ok=True, result=dict(skipped=True))
|
||||
return ReturnData(host=host, comm_ok=True, result=dict(changed=False, skipped=True))
|
||||
|
||||
# *****************************************************
|
||||
|
||||
|
@ -494,7 +494,7 @@ class Runner(object):
|
|||
conditional = template.template(self.basedir, self.conditional, inject, expand_lists=False)
|
||||
|
||||
if not utils.check_conditional(conditional):
|
||||
result = utils.jsonify(dict(skipped=True))
|
||||
result = utils.jsonify(dict(changed=False, skipped=True))
|
||||
self.callbacks.on_skipped(host, inject.get('item',None))
|
||||
return ReturnData(host=host, result=result)
|
||||
|
||||
|
|
Loading…
Reference in a new issue