Using the following /etc/ansible/hosts
file:
[app]
192.168.60.4 ansible_user=deploy
192.168.60.5 ansible_user=deploy
[db]
192.168.60.6 ansible_user=deploy¬
By default ansible will run your commands in parallel using multiple process forks. To check the host name
ansible all -a "hostname"
ansible all -a "hostname" -f 1
It is rare that you will need to do that the number of forks will usually be around -f 10
or f -20
Disk space:
ansible all -a "df -h"
Free memory:
ansible all -a "free -m"
Date and Time:
ansible all -a "date"