Last active
May 24, 2019 09:51
-
-
Save madsonic/a5817445514fb67f8787032285030174 to your computer and use it in GitHub Desktop.
ansible gather facts
This file contains 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
# stdout_call back must be in json | |
ansible -i <inventory> <inventory_hostname> -m setup | |
# depending on ansible config, the facts file might be cached locally, see '~/ansible.cfg' | |
# internal ip | |
"{{ ansible_facts['default_ipv4']['address'] }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment