Anisble – how to collect information about your remote hosts
In order to do so, we will discuss about ansible modue: Gathers facts

Display facts from all hosts and store them at /tmp/facts indexed by hostname
ansible all -m setup --tree /tmp/facts
➡ now check the file to have a clear view off all variables (facts) collected by ansible for your host like the well known {{ inventory_hostname }}