How do I run ansible command on non-win/lin host ?

How do I run command without playbook on non-win/lin host ?

[irekr@nms02 ansible]$ ansible cp11 -i hosts -c local -a “show software-version”
Irek-11 | FAILED | rc=2 >>
[Errno 2] No such file or directory

see below my hosts file

[irekr@nms02 ansible]$ cat hosts
[local]
localhost
[cp11]
Irek-11 ansible_ssh_host=10.199.107.1 ansible_ssh_user=admin

and how do I run this command from ssh

It depends on the SSH implementation on such devices. This is a fairly common situation with network devices, etc. which most of the times come with a minimalistic SSH.
I remembered a thread that was quite good at detailing some gotchas in these use cases of Ansible.
I am linking to Mark’s reply: https://groups.google.com/forum/#!searchin/ansible-project/tty/ansible-project/GEwuvE5GmpM/WQyIFWkjn0QJ but I advise you to closely read all the thread.

I believe I saw another 2-3 such threads on the mailing list.

Hope this helps, Dan.