Register skipped tasks so we can at least check their changed/not-changed status.

pull/2803/head
Michael DeHaan 12 years ago
parent 7d302c42e6
commit a81089231e

@ -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…
Cancel
Save