Hello,
I have been attempting to connect to various Cisco IOS devices in our dev environment with no luck using the network_cli connection method. I can communicate with all devices when running ‘ansible ios -m ping’ and setting the connection method to ‘ansible_connection: local’; however I cannot ping them when using the ‘ansible_connection: network_cli.’ When using the network_cli connection method I get a socket error stating “socket is closed.” I can ssh manually to all of my cisco ios devices also. More information on release and ansible.cfg can be seen below:
Ansible version - 2.5.2
RHEL release - 7.5
ansible.cfg:
[defaults]
inventory = inventory/dev/
host_key_checking = False
roles_path = ~/.ansible/roles:roles/
log_path = /home/cjguerrero/ansible/Ansible-NIS/ansible.log
[paramiko conneciton]
[ssh connection]
[persistent connection]
connect_timeout = 60
command_timeout = 30
One thing that is interesting in the debug logs is that I can see the login banner for the cisco device; however it never retrieves the config and ultimately ends with an error… Any guidance would be greatly appreciated!
Thanks,
Caleb