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.
On Friday, February 7, 2020 at 10:46:50 PM UTC+5:30, jesty sam wrote:
>
> 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
>
> ---
> - name: gather information from routers
> hosts: ios
> gather_facts: no
>
> tasks:
> - name: gather router facts
> ios_facts:
>
> Below is the hosts file entry
>
> [ios]
> 10.0.0.21:5007
>
> [ios:vars]
> ansible_network_os=ios
> #ansible_port=5007
> ansible_connection=network_cli
> ansible_python_interpreter=/usr/bin/env python
>
>
> what could be wrong?
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/910748df-d51d-4bb4-a06a-857ea09d53c1%40googlegroups.com.