Hi Ravi,

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. 

Thanks!!


On Tuesday, January 5, 2016 at 11:20:56 AM UTC-6, Ravi B wrote:
>
> Hi Toshio,
>     You're right!! I was not able to ssh to 127.0.0.1.
> $ ssh 127.0.0.1
> ssh_exchange_identification: Connection closed by remote host
>
> Then I replaced 127.0.0.1 with the fully qualified hostname. After that it 
> worked ( I had to give the --ask-pass option to the command)
>
> $ ansible all -m ping --ask-pass
> SSH password:
> <host.ip.address.here> | SUCCESS => {
>     "changed": false,
>     "ping": "pong"
> }
>
> Thank you Toshio and Chun-Hung for all your help! I can't thank you enough 
> as it solved my headache.
>
>
> On Tuesday, January 5, 2016 at 9:47:13 AM UTC-5, tkuratomi wrote:
>>
>> Ssh 127.0.0.1 works?
>> Does ansible all -m ping -c ssh work ?
>>
>> -Toshio
>> On Jan 4, 2016 8:27 AM, "Ravi B" <[email protected]> wrote:
>>
>>> 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)
>>>
>>> # cat $ANSIBLE_HOSTS
>>> 127.0.0.1
>>>
>>> # ansible --version
>>> ansible 1.9.4
>>>   configured module search path = None
>>>
>>> *# 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*
>>>
>>> *I'm getting the same error with ansible 2 also*
>>> # ansible --version
>>> ansible 2.1.0
>>>   config file =
>>>   configured module search path = Default w/o overrides
>>>
>>> # ansible all -m ping
>>> 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
>>> }
>>>
>>> -- 
>>> 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 post to this group, send email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/390aff87-4911-4a6b-b58a-598671d4312a%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/ansible-project/390aff87-4911-4a6b-b58a-598671d4312a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/445ba0a9-665b-4090-ab7d-a86d300b7c66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to