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

**URL:** <https://forum.ansible.com/t/how-do-i-run-ansible-command-on-non-win-lin-host/17680>\
**Category:** Ansible Project\
**Created:** [March 5, 2015, 4:28pm UTC](https://forum.ansible.com/t/how-do-i-run-ansible-command-on-non-win-lin-host/17680 "2015-03-05T16:28:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Irek\_Romaniuk](https://avatars.discourse-cdn.com/v4/letter/i/bbe5ce/32.png) [@Irek\_Romaniuk](https://forum.ansible.com/u/Irek_Romaniuk)\
**Post date:** [March 5, 2015, 4:28pm UTC](https://forum.ansible.com/t/how-do-i-run-ansible-command-on-non-win-lin-host/17680/1 "2015-03-05T16:28:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vaida.dan](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vaida.dan](https://forum.ansible.com/u/vaida.dan)\
**Post date:** [March 7, 2015, 4:37pm UTC](https://forum.ansible.com/t/how-do-i-run-ansible-command-on-non-win-lin-host/17680/2 "2015-03-07T16:37:15Z")

</div>

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](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.
