Hi,
When I execute ansible command, it return success result:
root@****temps# ansible release -m raw -u root -a “pwd” -c paramiko -k
SSH password:
10.170.124.24 | SUCCESS | rc=0 >>
/root
But if I write this module to playbook, it could not work. See the yml:
root@****/temps# vim test_spit.yml
- hosts: release
remote_user: root
tasks:
- name: Hello
raw: pwd
register: hello
- debug: msg={{ hello.stdout }}
- debug: var=hello
Result:
root@****/temps# ansible-playbook test_spit.yml -c paramiko -k
SSH password:
PLAY ***************************************************************************
TASK [setup] *******************************************************************
fatal: [10.170.124.24]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Traceback (most recent call last):\r\n File "/root/.ansible/tmp/ansible-tmp-1454657696.94-60833346390899/setup", line 198, in \r\n import shlex\r\nImportError: No module named shlex\r\n”, “parsed”: false}
NO MORE HOSTS LEFT *************************************************************
PLAY RECAP *********************************************************************
10.170.124.24 : ok=0 changed=0 unreachable=0 failed=1
Do you have any comments for this issue? I appreciate your help.