Unable to ping Using Inventory

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, 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

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

ansible -m ping -i inventory.yaml node0

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

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