Hello,
installed linux (CENTOS) and trying to run an ansible test ping.
straight from linux box ssh cisco@172.1.1.2 works.
but the “ansible -m ping all” doesnt.
Maybe it’s clear where could be a problem from this output:
`
[osboxes@osboxes ~]$ ansible -m ping servers -vvv
Using /etc/ansible/ansible.cfg as config file
META: ran handlers
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/ping.py
<172.1.1.2> ESTABLISH SSH CONNECTION FOR USER: cisco
<172.1.1.2> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o User=cisco -o ConnectTimeout=10 -o ControlPath=/home/osboxes/.ansible/cp/1ed8487ad4 172.1.1.2 ‘/bin/sh -c ‘"’“‘echo ~ && sleep 0’”’“‘’
<172.1.1.2> (0, ‘\r\nLine has invalid autocommand “/bin/sh -c 'echo ~ && sleep 0'”’, ‘’)
<172.1.1.2> ESTABLISH SSH CONNECTION FOR USER: cisco
<172.1.1.2> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o User=cisco -o ConnectTimeout=10 -o ControlPath=/home/osboxes/.ansible/cp/1ed8487ad4 172.1.1.2 '/bin/sh -c '”‘"’( umask 77 && mkdir -p “echo Line has invalid autocommand "/bin/sh -c '"'"'"'"'"'"'"'"'echo ~ && sleep 0'"'"'"'"'"'"'"'"'"/.ansible/tmp/ansible-tmp-1499178341.35-260752414357590
” && echo ansible-tmp-1499178341.35-260752414357590=“echo Line has invalid autocommand "/bin/sh -c '"'"'"'"'"'"'"'"'echo ~ && sleep 0'"'"'"'"'"'"'"'"'"/.ansible/tmp/ansible-tmp-1499178341.35-260752414357590
” ) && sleep 0’“'”‘’
<172.1.1.2> (0, '\r\nLine has invalid autocommand “/bin/sh -c '( umask 77 && mkdir -p “echo Line has invalid autocommand "/bin/sh -c \'"\'"\'echo ~ && sleep 0\'"\'"\'"/.ansible/tmp/ansible-tmp-1499178341.35-260752414357590
” && echo ansible-tmp-1499178341.35-260752414357590=” echo Line has invalid autocomma"', 'muxclient: master hello exchange failed\r\n') <172.1.1.2> PUT /tmp/tmpacZGSy TO "
echo Line has invalid autocomma"/ping.py
<172.1.1.2> SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -C -o ControlMaster=auto -o ControlPersist=60s -o User=cisco -o ConnectTimeout=10 -o ControlPath=/home/osboxes/.ansible/cp/1ed8487ad4 ‘[172.1.1.2]’
<172.1.1.2> (255, ‘’, ‘Connection closed\r\n’)
172.1.1.2 | UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh: Connection closed\r\n”,
“unreachable”: true
`
Thanks for any suggestion, i cant think of something else..