I’m running ansible stable-1.9 (from git)
I have a playbook task which looks like this:
- name: Install virtualenv
easy_install: name=virtualenv executable=easy_install
- name: Setup pip packages
pip: name={{item}} virtualenv=/home/ec2-user/scrapy virtualenv_command=virtualenv executable=pip virtualenv_site_packages=yes extra_args=“–allow-external”
with_items: - scrapy
- pika
…
When I run the playbook I see:
TASK: [Install virtualenv] ****************************************************
ok: [ec2-54-78-26-101.eu-west-1.compute.amazonaws.com]
TASK: [Setup pip packages] ****************************************************
ok: [ec2-54-78-26-101.eu-west-1.compute.amazonaws.com] => (item=scrapy)
ok: [ec2-54-78-26-101.eu-west-1.compute.amazonaws.com] => (item=pika)
…
PLAY RECAP ********************************************************************
ec2-54-78-26-101.eu-west-1.compute.amazonaws.com : ok=5 changed=0 unreachable=0 failed=0
However when I log into the server and activate the virtualenv I see none of the packages that ansible reports as installed:
$ source scrapy/bin/activate
(scrapy)[ec2-user]$ pip freeze
(none of the installed packages are listed)
What is really strange is that the packages don’t seem to be anywhere on the server i.e
$ cd /
$ sudo find . | grep -i pika
$
What am I missing here?