I’m very new to Ansible. I have a small lab running and I’m trying to evaluate the use of Ansible for making network changes. I have a workstations running CentOS Linux release 7.3.1611 and Ansible 2.3.0 as a fresh install. I’m using a cisco 819 router running Cisco IOS Software, C800 Software (C800-UNIVERSALK9-M), Version 15.3(3)M.3. I can SSH from the workstation to the router from the work station and via putty on a windows 10 machine but when I try a connection test I get the following:
[pat@new-host-8 ~]$ansible all -m ping
192.168.1.142 | UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: Connection closed\r\n”,
“unreachable”: true
}
I’ve run multiple debugs. Can anyone make a suggestion on what the issue might be? I’ve done some research and have run a number of raw commands as well as a small playbook it appears to not be an SSH error but an issue within an Ansible module with sleep 0 command…
Regards
Pat
Testing SSH terminal session from Ansible host system to the router
[pat@new-host-8 ~]$ ssh 192.168.1.142 -l pat
819#