Use Ansible setup module to gather facts

Display gathered facts

Display gathered facts about your inventory hosts using the following command:
$ ansible all -i hosts -m setup | less

Display all facts about all the hosts in your inventory
$ ansible all -m setup 

Comments