 <p>If you're gathering facts, you can access hostvars via the normal jinja2 + variable lookup:</p> <p>e.g. </p> <pre><code>- hosts: serverA.example.org gather_facts: True ... tasks: - set_fact: taco_tuesday: False </code></pre> <p>and then, if this has run, on another host:</p> <pre><code>- hosts: serverB.example.org ... tasks: - debug: var="{{ hostvars['serverA.example.org']['ansible_memtotal_mb'] }}" - debug: var="{{ hostvars['serverA.example.org']['taco_tuesday'] }}" </code></pre> <p>Keep in mind that if you have multiple Ansible control machines (where you call <code>ansible</code> and <code>ansible-playbook</code> from), you should take advantage of the fact that Ansible can store its <a href="http://docs.ansible.com/ansible/playbooks_variables.html#fact-caching" rel="nofollow">facts/variables in a cache</a> (currently Redis and json), that way the control machines are less likely to have different hostvars. With this, you could set your control machines to use a file in a shared folder (which has its risks -- what if two control machines are running on the same host at the same time?), or set/get facts from a Redis server.</p> <p>For my uses of Amazon data, I prefer to just fetch the resource each time using a tag/metadata lookup. I wrote an <a href="https://github.com/tfishersp/aws_tag" rel="nofollow">Ansible plugin</a> that allows me to do this a little more easily as I prefer this to thinking about hostvars and run ordering (but your mileage may vary).</p>