# Unable to ping Using Inventory

**URL:** <https://forum.ansible.com/t/unable-to-ping-using-inventory/26387>\
**Category:** Ansible Project\
**Created:** [December 28, 2017, 5:58am UTC](https://forum.ansible.com/t/unable-to-ping-using-inventory/26387 "2017-12-28T05:58:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaikh\_MateenRehan\_M](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@Shaikh\_MateenRehan\_M](https://forum.ansible.com/u/Shaikh_MateenRehan_M)\
**Post date:** [December 28, 2017, 5:58am UTC](https://forum.ansible.com/t/unable-to-ping-using-inventory/26387/1 "2017-12-28T05:58:31Z")

</div>

Hello All,

I am new to ansible and I am am trying to ping different hosts using ansible. I though it was a bug so created an issue on github [https://github.com/ansible/ansible/issues/34267](https://github.com/ansible/ansible/issues/34267), but they said to contact here. I tried the solution given there ansible all -m ping -i inventory.yaml node0, I got an error Some modules do not make sense in Ad-Hoc (include, meta, etc)  
ERROR! Extraneous options or arguments. Please help.

Thanks,  
Mateenrehan Shaikh

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [December 28, 2017, 8:16am UTC](https://forum.ansible.com/t/unable-to-ping-using-inventory/26387/2 "2017-12-28T08:16:24Z")

</div>

You didn't get that command in the Github issue, you got this one

ansible -m ping -i inventory.yaml node0

---

<div class="post-metadata">

**Author:** ![Shaikh\_MateenRehan\_M](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@Shaikh\_MateenRehan\_M](https://forum.ansible.com/u/Shaikh_MateenRehan_M)\
**Post date:** [December 28, 2017, 9:49pm UTC](https://forum.ansible.com/t/unable-to-ping-using-inventory/26387/3 "2017-12-28T21:49:28Z")

</div>

When I typed that command I got an error Extraneous options or arguments, so this command is wrong. Do you know the right command?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [January 2, 2018, 4:56pm UTC](https://forum.ansible.com/t/unable-to-ping-using-inventory/26387/4 "2018-01-02T16:56:31Z")

</div>

@shaikh, the command looks right, can you print both the command and  
the output you get with -vvv added?
