Im making an ansible role to install a clean Django CMS instance, when trying to activate my installed Virtual Env I'm getting a permission error, I have read up that sometimes this can be caused when making the env with different permissions to when you try and activate it. I have tried with and without root sudo in both instances.
I am using a Ubuntu/Trusty64
box.
Here is the error im getting from my task:
TASK [dependancies : Activate Venv] ********************************************
fatal: [default]: FAILED! => {"changed": false, "cmd": ". env/bin/activate", "failed": true, "msg": "[Errno 13] Permission denied", "rc": 13}
Here is my role file:
---
- name: Update apt-get
become: yes
apt:
update_cache: yes
- name: Install Packages
apt:
name: "{{ item }}"
with_items:
- nginx
- python3
- python-pip
- nodejs
- git
- python-passlib # for htpasswd
- postgresql
- libpq-dev # for postgresql
- python-psycopg2 # for postgresql
- ansible # to run ansible-pull
become: yes
- name: Install Python Libraries
pip:
name: "{{ item }}"
executable: pip
become: yes
with_items:
- virtualenv
- awscli # for backups
- name: Create Venv
command: virtualenv env
args:
creates: env/bin/activate
- name: Activate Venv
command: . env/bin/activate
- name: Install Django-CMS Insaller
pip:
name: djangocms-installer
executable: pip
- name: Create Folder
file: path=django state=directory
- name: Create Django CMS
command: djangocms -s -p . testSite
args:
chdir: django
become: yes
Any advice would be greatly appreciated.