This doesn't seem to be about virtualenv, but that you have a previous
install of Ansible and you're finding some old libraries.

When you do use virtualenv though, be sure to set
ansible_python_interpreter on the control machine so it's using the right
python for dependencies for local action steps.




On Fri, May 23, 2014 at 2:18 AM, 'Petros Moisiadis' via Ansible Project <
ansible-project@googlegroups.com> wrote:

>  On 05/23/2014 12:49 AM, Yapeng Wu wrote:
>
> Azul,
>
>  No, I stopped using ansible in virtualenv. Which platform are you using?
>
>  I am wondering if ansible supports in virtualenv.
>
>  Yapeng
>
> On Thursday, May 22, 2014 11:49:51 AM UTC-4, Azul Inho wrote:
>>
>> I am having exactly the same error message, but in my case I am not using
>> virtualenv.
>> Did you get this sorted?
>>
>>
>>
>> On Sunday, March 16, 2014 3:47:18 PM UTC, Yapeng Wu wrote:
>>>
>>> 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 <module>
>>>
>>>     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
>>>
>>    --
> 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/08ff32a2-77ff-44e3-acd9-7a637e88447a%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/08ff32a2-77ff-44e3-acd9-7a637e88447a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> I cannot tell you what went wrong, but I remember that once I had problems
> running ansible in virtualenv myself too. Since my only reason to run
> ansible in a virtualenv was to run some playbooks with a newer ansible
> version, but didn't want to replace my then current version, I did not
> spend time looking at it further and used the hacking environment instead.
> This is actually the recommended way to test things in ansible. So if you
> have similar needs, have a look at the documentation on how to enable the
> hacking environment (pretty easy):
>
> http://docs.ansible.com/intro_installation.html#running-from-source
>
>
>  --
> 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/537EE828.3090509%40yahoo.gr<https://groups.google.com/d/msgid/ansible-project/537EE828.3090509%40yahoo.gr?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2BnsWgzFXZBGP2DqHYr5UVCwp3UQUrTFLgjVj8h5kv%2BK_bc43Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to