Local setup:
        ansible 1.8.2
        python 2.7.1

Remote:
        ansible 1.8.2
        python 2.7.6
        pip 1.5.4


Playbook:

---
- hosts: all
  remote_user: hyc
  vars:
    local_base_dir: "{{ lookup('env', 'VIRTUAL_ENV') }}/../.."
    remote_base_dir: "/home/hyc/hyc.org" 

  tasks:
  - name: create virtualenv
    pip: chdir="{{ remote_base_dir }}/deploy"
         requirements=pip-requirements
         virtualenv=python-env


When I run this playbook, my virtualenv gets created on the remote machine, but 
pip tries to install into the global environment, resulting in errors like:

error: could not create '/usr/local/lib/python2.7/dist-packages/django': 
Permission denied

It appears that the virtualenv doesn't get activated before pip starts to run.  
What am I doing wrong?


--
Roy Smith
[email protected]



-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/F44D55F1-8349-40C4-97AF-2989678D86E7%40panix.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to