ansible -i /path_to_your_hosts_file/ all -m ping
ansible --help
-i INVENTORY, --inventory=INVENTORY, --inventory-file=INVENTORY
specify inventory host path or comma separated host
list. --inventory-file is deprecated
ansible -i /path_to_your_hosts_file/ all -m ping
ansible --help
-i INVENTORY, --inventory=INVENTORY, --inventory-file=INVENTORY
specify inventory host path or comma separated host
list. --inventory-file is deprecated