1
0
Fork 0
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:
Michael DeHaan 2013-04-28 10:13:58 -04:00
parent 7d302c42e6
commit a81089231e
2 changed files with 2 additions and 5 deletions

View file

@ -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

View file

@ -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)