Hi everyone,
I’m new to ansible and trying to get the basing ping working on local host (127.0.0.1 in the $ANSIBLE_HOSTS file) but keep running into problems.I thought the problem was python3 that was installed on the machine, but I uninstalled python3 (deleted the python3 binaries and reinstalled ansible from source). I’m still getting the same error with ansible (see the error below in red).
The command “ansible all -m ping” is not working.
python -V
Python 2.7.11
pip install --upgrade paramiko
Requirement already up-to-date: paramiko in /usr/local/lib/python2.7/site-packages/paramiko-1.16.0-py2.7.egg
Requirement already up-to-date: pycrypto!=2.4,>=2.1 in /usr/local/lib/python2.7/site-packages/pycrypto-2.6.1-py2.7-linux-x86_64.egg (from paramiko)
Requirement already up-to-date: ecdsa>=0.11 in /usr/local/lib/python2.7/site-packages/ecdsa-0.13-py2.7.egg (from paramiko)
# ansible all -m ping No handlers could be found for logger “paramiko.transport” 127.0.0.1 | FAILED => FAILED: Error reading SSH protocol banner[Errno 104] Connection reset by peer
No handlers could be found for logger “paramiko.transport”
127.0.0.1 | UNREACHABLE! => {
“changed”: false,
“msg”: “ERROR! Error reading SSH protocol banner[Errno 104] Connection reset by peer”,
“unreachable”: true
}
Could you please tell how you made it work. what does this mean " fully qualified hostname" ?
I am able to ssh using username@ip address but unable to ping it.
I am using CentOS 7 and the host machine is a Cisco IOS router.
An 'Ansible ping' checks that Python is on the remote host - cisco iOS
probably doesn't
have that, so you'd manage it with ansible modules running on your ansible host.