Hi,

My server configure no pass ssh login, today when execute ansible command 
it failed stranged. But I manually execute ssh comand it works, how can I 
check this issue?

Server:  Ubuntu 12.04.4 LTS x86
Python:  2.7.3
Ansible: 1.7.1

$ ansible remote-host -i inventory -m shell -a "pwd" 
remote-host | FAILED >> {
    "failed": true, 
    "msg": "  File 
\"/home/icc/.ansible/tmp/ansible-tmp-1421217087.5-245102095938646/command\", 
line 117\r\n    \r\n                         ^\r\nIndentationError: 
expected an indented block\r\n", 
    "parsed": false
}


enable debug info, show


GATHERING FACTS 
***************************************************************
<remote-host> ESTABLISH CONNECTION FOR USER: icc
<remote-host> REMOTE_MODULE setup
<remote-host> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 
'StrictHostKeyChecking=no', '-o', 'PasswordAuthentication=yes', '-o',       
                    'KbdInteractiveAuthentication=no', '-o', 
'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', 
'-o',                           'PasswordAuthentication=no', '-o', 
'ConnectTimeout=10', 'remote-host', "/bin/sh -c 'mkdir -p 
$HOME/.ansible/tmp/ansible-tmp-1421218002.78-            57926925100892 && 
chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1421218002.78-57926925100892 && 
echo $HOME/.ansible/tmp/ansible-tmp-1421218002.78-        57926925100892'"]
<remote-host> PUT /tmp/tmpPIExuz TO /home/icc/.ansible/tmp/ansible-tmp-
1421218002.78-57926925100892/setup
<remote-host> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 
'StrictHostKeyChecking=no', '-o', 'PasswordAuthentication=yes', '-o',       
                    'KbdInteractiveAuthentication=no', '-o', 
'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', 
'-o',                           'PasswordAuthentication=no', '-o', 
'ConnectTimeout=10', 'remote-host', u"/bin/sh -c 'LANG=en_US.UTF-8 
LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/     
icc/.ansible/tmp/ansible-tmp-1421218002.78-57926925100892/setup; rm -rf 
/home/icc/.ansible/tmp/ansible-tmp-1421218002.78-57926925100892/ >/dev/     
  null 2>&1'"]
failed: [remote-host] => {"failed": true, "parsed": false}
invalid output was:   File 
"/home/icc/.ansible/tmp/ansible-tmp-1421218002.78-57926925100892/setup", 
line 107^M
    ^M
      ^^M
IndentationError: expected an indented block^M
OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config^M
debug1: /etc/ssh/ssh_config line 19: Applying options for *^M


Thanks,
Linbo

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/56042de3-b8dd-44a5-aa52-84796437e82c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to