# Configuring Switch which doesn't have python installed.

**URL:** <https://forum.ansible.com/t/configuring-switch-which-doesnt-have-python-installed/28076>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [July 18, 2018, 6:01am UTC](https://forum.ansible.com/t/configuring-switch-which-doesnt-have-python-installed/28076 "2018-07-18T06:01:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![churchill\_davidson](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@churchill\_davidson](https://forum.ansible.com/u/churchill_davidson)\
**Post date:** [July 18, 2018, 6:01am UTC](https://forum.ansible.com/t/configuring-switch-which-doesnt-have-python-installed/28076/1 "2018-07-18T06:01:17Z")

</div>

I am writing a custom module in python to configure a networking device(switch).If python is installed in the remote node then i can directly execute the script in the remote node and i have written the code accordingly.

I want to know how will i configure a device which doesn’t have python installed.Do i have to pass the parameters to the script through the YAML file and pass the host list which has to be configured also and then connect each host through the written logic in the module and configure the device?

Can someone please help me with the method?Also,if there is a sample script and play-book it will be greatly helpful.

Regards,  
Churchill

---

<div class="post-metadata">

**Author:** ![ganeshrn](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ganeshrn/32/1021_2.png) [@ganeshrn](https://forum.ansible.com/u/ganeshrn)\
**Post date:** [July 18, 2018, 3:47pm UTC](https://forum.ansible.com/t/configuring-switch-which-doesnt-have-python-installed/28076/2 "2018-07-18T15:47:58Z")

</div>

If python is not installed on remote host which is the case for most network device you can use of network\_cli [1] or netconf [2] or httapi [3] connection pluginbased on the device capabilities.

You can refer [4] for more details on module ↔ network\_cli code flow.

[1] [https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/network\_cli.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/network_cli.py)  
[2] [https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/netconf.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/netconf.py)  
[3] [https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/httpapi.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/httpapi.py)  
[4] [https://groups.google.com/forum/#!topic/ansible-devel/qkDYC9MygGw](https://groups.google.com/forum/#!topic/ansible-devel/qkDYC9MygGw)

Hope this helps.

Regards,  
Ganesh

---

<div class="post-metadata">

**Author:** ![ganeshrn](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ganeshrn/32/1021_2.png) [@ganeshrn](https://forum.ansible.com/u/ganeshrn)\
**Post date:** [July 18, 2018, 4:07pm UTC](https://forum.ansible.com/t/configuring-switch-which-doesnt-have-python-installed/28076/3 "2018-07-18T16:07:35Z")

</div>

Also refer [https://groups.google.com/forum/#!topic/ansible-devel/TVe1HLYh4s8](https://groups.google.com/forum/#!topic/ansible-devel/TVe1HLYh4s8) for insights on developing module that works with network\_cli connection plugin.

Regards,  
Ganesh

---

<div class="post-metadata">

**Author:** ![churchill\_davidson](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@churchill\_davidson](https://forum.ansible.com/u/churchill_davidson)\
**Post date:** [July 19, 2018, 8:11am UTC](https://forum.ansible.com/t/configuring-switch-which-doesnt-have-python-installed/28076/4 "2018-07-19T08:11:36Z")

</div>

Thanks a lot Ganesh for the valuable suggestion.Will explore this further.

Regards,  
Churchill
