Install Ansible on a host that is able to reach all the hosts you want to scan. Follow the instructions:
http://docs.ansible.com/ansible/latest/intro_installation.html
Then set up a Hosts file /etc/ansible/hosts
[all]
overlord
10.10.10.2
[all:vars]
ansible_ssh_common_args='-o StrictHostKeyChecking=no'
ansible_user=root
ansible_ssh_pass=RootPassword
#ansible_become=True
#ansible_become_method='sudo'
#ansible_become_pass=sudopassword
It can be ip address or dns names, as long as it is resolvable. If you need to use sudo uncomment and change the ansible_user
/ ansible_ssh_pass
Run setup module to extract information from hosts
# ansible -i hosts all -m setup
for all facts and you can filter the facts using
# ansible -i hosts overlord -m setup -a 'filter=ansible_distribution*'
overlord | SUCCESS => {
"ansible_facts": {
"ansible_distribution": "OracleLinux",
"ansible_distribution_major_version": "7",
"ansible_distribution_release": "NA",
"ansible_distribution_version": "7.3"
},
"changed": false
}