New ability to access results of a previous module call !

As you know, Ansible intentionally doesn't have a lot of "if logic" in it. However, sometimes you need to make a decision.

In the past, that meant using "only_if" (see docs) with a custom module that defined your own facts. I guess that's fine, but it means writing a module.

What if you need to conditionally decide something based on some expression, and that expression might even involve some variables? You're kind of out of luck.
Plenty of reasons to do this.

Maybe I have a whole decision tree that doesn't want to run unless a particular package is installed, or a file is present, or SELinux is enabled, or the Pope is not
Catholic. WE CAN DO THIS. Here's an example:

https://github.com/ansible/ansible/blob/devel/examples/playbooks/register_logic.yml

Rather than just saving the last result, which wouldn't be any good if you needed that answer twice, I made it so you could
save any results you like, to any variable you like. This isn't up on the doc site yet, but will be closer to the release of 0.7.

Please test things out and let me know if you have any problems. It is not only useful for only_if, the values are good in templates and modules too.

--Michael