Is there exists some way to print on console gathered facts ?
I mean gatering facts using setup
module. I would like to print gathered facts. Is it possible ? If it is possible can someone show example?
An answer on StackOverflow suggests using - debug: var=vars or - debug: var=hostvars to print out all the variables used by an Ansible playbook.
Ansible facts are data gathered about target nodes (host nodes to be configured) and returned back to controller nodes. Ansible facts are stored in JSON format and are used to make important decisions about tasks based on their statistics.
Use setup
module as ad-hoc
command:
ansible myhost -m setup
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With