cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1644
Views
0
Helpful
2
Replies

Ansible connectivity

sprosons
Level 1
Level 1

Hi

I'm following "Introduction to Ansible for IOS XE" and hitting and issue with the always on XE sandbox.

 

The first task is to run "ansible-playbook ansible-02-ios-modules/02-ios_command_show.yaml"

When I run that I get a network error.

 "invalid connection specified, expected connection=local, got network_cli"

It feels like a basic connectivity issue. It would appear the device is not listening on tcp/8181 when I try telnet.

It's listening on 22 and 443 and I can use ssh and run the associated show commands from standard cli so the reachability is there.

2 Replies 2

marce1000
Hall of Fame
Hall of Fame

 

            - FYI : https://github.com/CiscoDevNet/dne-dna-code/issues/80

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

Hi

 

Thanks for the reply. I tried deactivating and that didn't work so I created the second venv but I still get python2.7 as the python module.

(venv) [developer@centos intro-ansible]$ deactivate
[developer@centos intro-ansible]$ python3 -m venv venv2
[developer@centos intro-ansible]$ source venv2/bin/activate

(venv2) [developer@centos intro-ansible]$ ansible --version
ansible 2.4.3.0
config file = /home/developer/code/dne-dna-code/intro-ansible/ansible.cfg
configured module search path = [u'/home/developer/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
(venv2) [developer@centos intro-ansible]$ ansible-playbook ansible-02-ios-modules/02-ios_command_show.yaml

PLAY [Sample IOS show version for Ansible 2.5] *********************************************************************************************

TASK [GATHERING FACTS] *********************************************************************************************************************
fatal: [ios-xe-mgmt.cisco.com]: FAILED! => {"changed": false, "msg": "invalid connection specified, expected connection=local, got network_cli"}
to retry, use: --limit @/home/developer/code/dne-dna-code/intro-ansible/ansible-02-ios-modules/02-ios_command_show.retry

PLAY RECAP *********************************************************************************************************************************
ios-xe-mgmt.cisco.com : ok=0 changed=0 unreachable=0 failed=1

(venv2) [developer@centos intro-ansible]$

 

Could it be the version of python that's the issue rather that the host not listening on 8181?