ansible adhoc and run_once how to ?

Thank you in advance for your time and help.

In ansible adhoc command how do I specify run_once ?

I can do that in ansible playbook but adhoc I dont now how to do that.

Any suggestions is very helpful.

-Narahari

run_once is the same as just specifying one(1) host.

If you have a group like webserver

   ansible webserver -m ping

you can specify one host like so

   ansible webserver[0] -m ping

Thank you so much. Did not know I could index groups. Appreciate your help very much.

-Narahari