I can't execute any module for a special server(which i can well done in 
other server).
Can anyone help solve this problem? Thank you very much!!

LInux Envs:
Linux {local_host} 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 
2015 x86_64 x86_64 x86_64 GNU/Linux
Linux {remote_host} 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

All Python Version: 2.7.5
Ansible Version: 2.3.1.0


Full command and msg as follow:
ansible -i {hostname}, -vvv -m shell -a 'python --version' all
META: ran handlers
Using module file 
/usr/lib/python2.7/site-packages/ansible/modules/commands/command.py
<${hostname}> ESTABLISH SSH CONNECTION FOR USER: root
<${hostname}> SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=1800s 
-o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o 
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o 
ControlPath=/home/zhengzhuobin/.ansible/cp/a06eb3b99c ${hostname} '/bin/sh 
-c '"'"'/usr/bin/python && sleep 0'"'"''
<${hostname}> (249, '', '')
${hostname} | FAILED! => {
    "changed": false, 
    "failed": true, 
    "module_stderr": "", 
    "module_stdout": "", 
    "msg": "MODULE FAILURE", 
    "rc": 249
}

And I can execute ssh command to this server.
 ssh ${hostname} python --version
Python 2.7.5

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f900d492-d89a-48ac-9628-822b0a5d6d33n%40googlegroups.com.

Reply via email to