Connectivity

  1. Set up hosts by editing the hosts' file in the Ansible directory

$ sudo nano /etc/ansible/hosts 
  1. To check the connection to hosts first change the directory to /etc/Ansible

$ cd /etc/ansible 
  1. To check whether Ansible is connecting to hosts, use ping command

$ ansible –m ping 
  1. To check on servers individually

$ ansible -m ping server name 
  1. To check a particular server group

$ ansible -m ping servergroupname

Last updated