Created
February 4, 2015 21:08
-
-
Save halberom/6a8910c903f376e5b197 to your computer and use it in GitHub Desktop.
ansible - example using facts of other hosts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: dbservers | |
| gather_facts: true # default | |
| # don't do anything here, just want to populate all the facts about the dbservers | |
| - hosts: webservers | |
| tasks: | |
| - name: do something with a db server fact | |
| debug: var=hostvars[db_server] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment