Store the ${last_result} for each host to make it usable in only_if conditionals and such.

pull/846/head
Michael DeHaan 12 years ago
parent 58e099b91b
commit 6c5761a79e

@ -27,6 +27,7 @@ Ansible Changes By Release
* allow variables in parameterized task include parameters (regression)
* make remote_md5 internal function work with non-bash shells
* allow user to be passed in via --extra-vars (regression)
* ${last_result} variable stores the last result for each host
0.6 "Cabo" -- August 6, 2012

@ -224,6 +224,7 @@ class PlayBook(object):
for host, result in results['contacted'].iteritems():
facts = result.get('ansible_facts', {})
self.SETUP_CACHE[host].update(facts)
self.SETUP_CACHE[host]['last_result'] = result
# flag which notify handlers need to be run
if len(task.notify) > 0:

Loading…
Cancel
Save