[Network modules] Managed nodes requirements about python

19 views
Skip to first unread message

Niko

unread,
Aug 10, 2018, 6:50:09 AM8/10/18
to Ansible Project
## Question

- Could we use network modules(such a ios_command) on the network nodes that cannot execute python?

## Purpose

- I want to manage the network nodes(cisco) that do not have python by ansible playbook.
ex. "ios_command: show version",
      ...etc

## Details

- In the official documents say we need python2 or python3 as follows.

- On the otherhand, following "Execution on the Control Node" chapter supposed to mentioned we don't need python for managed nodes in case of using network modules. 

- I wonder which documentation is correct. So I want to understand accurate requirements of managed node especially python execution.

Thanks,
Niko.

Jonathan Lozada De La Matta

unread,
Aug 10, 2018, 6:53:27 AM8/10/18
to ansible...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/604583d7-5b4f-43ae-a2f4-9d0dd763b458%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Jonathan lozada de la matta

AUTOMATION CONSULTANT - AUTOMATION PRACTICE

Red Hat Consulting Services

jloz...@redhat.com   



 

Niko

unread,
Aug 10, 2018, 7:22:32 AM8/10/18
to Ansible Project
Thanks a lot. I understood the differences and we don't need python for managed nodes when we user network modules.

Just my curiosity, in case of Linux, what is the benefits of copying and executing python codes on Linux hosts?
It supposed that ansible can manage non-network nodes such a Linux hosts like network nodes(local execution), but is this reasonable idea? 

2018年8月10日金曜日 19時53分27秒 UTC+9 Jonathan Lozada De La Matta:

Jonathan Lozada De La Matta

unread,
Aug 10, 2018, 7:30:10 AM8/10/18
to ansible...@googlegroups.com
as far as I know is to speed up the process instead of doing the work from another location, it copies the files locally and runs the scripts.


For more options, visit https://groups.google.com/d/optout.

Niko

unread,
Aug 10, 2018, 7:37:48 AM8/10/18
to Ansible Project
thanks again!
I appreciated your swift answer.

Shawn Singh

unread,
Aug 11, 2018, 10:29:36 PM8/11/18
to Ansible Project
I would also add that the raw module works great for devices on which you don't get a full environment.
For example, in my environment we have a EMC Data Domain.
When logged in, I don't have a traditional shell, and the shell I use doesn't expose Python to me... if it is present at all.

I use the 'raw' module to execute commands on it.

Niko

unread,
Aug 14, 2018, 9:37:41 PM8/14/18
to Ansible Project
Thank you for your additional information.

I want to use return values of network modules to verify its status.
At first I planed to use raw module, but I find that return values of raw module is difficult to be parsed.
So I plan to use network modules mainly instead of raw module now.

2018年8月12日日曜日 11時29分36秒 UTC+9 Shawn Singh:
Reply all
Reply to author
Forward
0 new messages