Ansible VM and GNS3 routers

Hi

I have two VM’s in Azure, 1 VM running Ansible and the other having GNS3 (with connected routers and switches). I am able to telnet from Ansible server to the Routers configured in GNS3 however when i run a playbook i get an error

PLAY [gather information from routers] *********************************************************************************************************************************

TASK [gather router facts] *********************************************************************************************************************************************
fatal: [10.0.0.21]: FAILED! => {“changed”: false, “msg”: “[Errno None] Unable to connect to port 5007 on 10.0.0.21”}

PLAY RECAP *************************************************************************************************************************************************************
10.0.0.21 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Any suggestions?

Hello,

Are you able to manually SSH into the GNS3 Routers from the Ansible controller on the specified port? I see you are using ansible_connection=network_cli. This connection plugin provides a connection to remote devices over SSH and implements a CLI shell.