ansible ping host from inventory code example Example: Ansible ping hosts $ ansible <hostgroup-name> -m ping