Skip to content

Instantly share code, notes, and snippets.

@halberom
Created February 4, 2015 21:08
Show Gist options
  • Select an option

  • Save halberom/6a8910c903f376e5b197 to your computer and use it in GitHub Desktop.

Select an option

Save halberom/6a8910c903f376e5b197 to your computer and use it in GitHub Desktop.
ansible - example using facts of other hosts
---
- 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