# Ansible VM and GNS3 routers

**URL:** <https://forum.ansible.com/t/ansible-vm-and-gns3-routers/32177>\
**Category:** Ansible Project\
**Tags:** azure\
**Created:** [February 7, 2020, 5:16pm UTC](https://forum.ansible.com/t/ansible-vm-and-gns3-routers/32177 "2020-02-07T17:16:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jesty\_sam](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jesty\_sam](https://forum.ansible.com/u/jesty_sam)\
**Post date:** [February 7, 2020, 5:16pm UTC](https://forum.ansible.com/t/ansible-vm-and-gns3-routers/32177/1 "2020-02-07T17:16:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jesty\_sam](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jesty\_sam](https://forum.ansible.com/u/jesty_sam)\
**Post date:** [February 10, 2020, 2:33am UTC](https://forum.ansible.com/t/ansible-vm-and-gns3-routers/32177/2 "2020-02-10T02:33:29Z")

</div>

Any suggestions?

---

<div class="post-metadata">

**Author:** ![Nilashish\_Chakrabort](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@Nilashish\_Chakrabort](https://forum.ansible.com/u/Nilashish_Chakrabort)\
**Post date:** [February 10, 2020, 4:36am UTC](https://forum.ansible.com/t/ansible-vm-and-gns3-routers/32177/3 "2020-02-10T04:36:13Z")

</div>

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.
