Document how to reference variables about another host from any host.

This commit is contained in:
Michael DeHaan
2012-04-25 22:32:24 -04:00
parent 81773f5635
commit 0165ceb3cc
4 changed files with 22 additions and 1 deletions

View File

@@ -244,6 +244,16 @@ use the default remote connection type::
hosts: 127.0.0.1
connection: local
Variables From Other Hosts
++++++++++++++++++++++++++
If your database server wants to check the value of a 'fact' from another node, it's easy to do so
within a template or even an action line::
{{ hostvars.get('name_of_host').get('name_of_fact') }}
NOTE: No database or other complex system is required to exchange data between hosts. The hosts that you
want to reference data from must be included in either the current play or any previous play.
External Variables And Prompted or Sensitive Data
+++++++++++++++++++++++++++++++++++++++++++++++++