Hello, I am new to Ansible.
I have installed ansible in the virtualenv. But when I load a playbook, it failed in one “command” module:
TASK: [create the tahoe introducer] *******************************************
<127.0.0.1> REMOTE_MODULE command /home/ywu/.virtualenvs/sercle/bin/tahoe create-introducer -C /var/boomerang/2 chdir=/var/boomerang/2 creates=/var/boomerang/2/tahoe.cfg
<127.0.0.1> EXEC [‘/bin/sh’, ‘-c’, ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1394984637.79-197969704468652 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1394984637.79-197969704468652 && echo $HOME/.ansible/tmp/ansible-tmp-1394984637.79-197969704468652’]
<127.0.0.1> PUT /tmp/tmpCFiHXC TO /home/ywu/.ansible/tmp/ansible-tmp-1394984637.79-197969704468652/command
<127.0.0.1> EXEC [‘/bin/sh’, ‘-c’, ‘/home/ywu/.virtualenvs/sercle/bin/python /home/ywu/.ansible/tmp/ansible-tmp-1394984637.79-197969704468652/command; rm -rf /home/ywu/.ansible/tmp/ansible-tmp-1394984637.79-197969704468652/ >/dev/null 2>&1’]
failed: [127.0.0.1] => {“failed”: true, “parsed”: false}
invalid output was: Traceback (most recent call last):
File “/home/ywu/.ansible/tmp/ansible-tmp-1394984637.79-197969704468652/command”, line 1282, in
main()
File “/home/ywu/.ansible/tmp/ansible-tmp-1394984637.79-197969704468652/command”, line 139, in main
rc, out, err = module.run_command(args, executable=executable, use_unsafe_shell=shell)
TypeError: run_command() got an unexpected keyword argument ‘use_unsafe_shell’
FATAL: all hosts have already failed – aborting
If I run the playbook without virtualenv, it is running fine.
Could someone enlighten me what went wrong?
Thanks,
Yapeng