Open gcilleruelobeltran opened 1 year ago
Hey @gcilleruelobeltran can you help me with the netcommon version you have installed? Regards
Hi @KB-perByte of course! Here it is: Collection Version
ansible.netcommon 2.6.1
@gcilleruelobeltran Please consider updating netcommon to the latest, You should see the expected behavior. Let me know if it works for you.
Hi, I can confirm that upgrading netcommon to latest version is working propertly. This leads me to another issue. Normally I install ansible collections using a requirement file and I leave each collection with the default version like this:
collections:
- name: amazon.aws
- name: ansible.netcommon
- name: ansible.posix
- name: ansible.utils
...
If it isn't setup any version ansible installs the latest, however it happens ONLY with the netcommon collection that ansible installs the version I provided (2.6.1) which is not the latest. That is why I didn't have installed the latest (5.2.0) and I didn't realize. Would you have any clue what is happening here??
Thank you in advance!!
SUMMARY
I am trying to launch a command into a remote ios device using ios_command module (the same problem with ios_facts). With the proper configuration vars is trigering the error indicated in the tittle. See below the piece of code to reproduce it and also the explanation of what I think the problem is.
ISSUE TYPE
COMPONENT NAME
ios_command and ios_facts modules
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
REMOTE HOST CISCO VERSION: Cisco IOS XE Software, Version 16.09.04
STEPS TO REPRODUCE
It's simple I just try to execute command 'show run' in the remote cisco host. Here the simple peace of code.
EXPECTED RESULTS
I expect ansible to use libssh python package to connect to the remote host and not get any error in the log in process.
ACTUAL RESULTS
It gets an authenticating error when loging in. See the whole error below:
SOLUTION THAT I FOUND AND EXPLANATION
I established the ansible_network_cli_ssh_type to "libssh" so I just needed to add it in the vars section. This var made it work but why? It is curious that in the documentation that describes this variable says that "auto" is the default behavior and "auto will use ansible-pylibssh if that package is installed, otherwise will fallback to paramiko.". So It is supposed to use libssh package as default behavior so It shouldn't fail and It wouldn't be necessary to established like that this var. I tryed to deeg more and I did another test establishing the var like 'ansible_network_cli_ssh_type: "paramiko"' and failed in the exactly the some way as above. With this information I have two option happening here:
The second option is more likely for me, What do you think???