$ ansible -m ping

[WARNING]: Unable to parse /etc/ansible/hosts enable callback plugins as an
inventory source
[WARNING]: Unable to parse /etc/ansible/they can output to stdout but cannot be
'stdout' type. callback_whitelist = timer as an inventory source
[WARNING]: Unable to parse /etc/ansible/mail as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
[WARNING]: Could not match supplied host pattern, ignoring:
  • Hi Tazhar - we're going to need a bit more information than just the shell output. What version of ansible are you running? Do you have ssh keys set up? what kind of host is the target? etc Mar 12, 2020 at 9:42

1 Answer 1


Try this, to run an adhoc command with IP address

ansible all -i, -m ping | SUCCESS => {
    "changed": false, 
    "ping": "pong"

From man:

-i INVENTORY, --inventory=INVENTORY, --inventory-file=INVENTORY specify inventory host path or comma separated host

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.