ansible ping to host code example
Example 1: Ansible ping hosts
$ ansible <hostgroup-name> -m ping
Example 2: ansible ping with diferent port
[webservers]
web01.somedomain.com ansible_port=1234
$ ansible <hostgroup-name> -m ping
[webservers]
web01.somedomain.com ansible_port=1234