Commit 6c5761a7 by Michael DeHaan

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

parent 58e099b9
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment