Commit 87eb8ec2 by Jason Bau

sets --distribute flag in virtualenv creation

and conditionalizes nginx site creation in edxapp role
parent a704f356
---
# create the 'edx' virtual environment in /opt so that roles can populate it
- name: easy_install pip
easy_install: name=pip
- name: Install python and pip
apt: pkg={{item}} install_recommends=yes state=present update_cache=yes
with_items:
- python2.7
- python-pip
tags:
- venv_base
- pre_install
- install
- name: pip install virtualenv
......@@ -25,7 +28,7 @@
- install
- name: create the edx virtualenv directory initial contents
command: /usr/local/bin/virtualenv $venv_dir creates=$venv_dir/bin/activate
command: /usr/local/bin/virtualenv $venv_dir --distribute creates=$venv_dir/bin/activate
tags:
- venv_base
- install
......@@ -18,8 +18,10 @@
- update
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=cms
when_set: $nginx_role_run
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=cms-backend
when_set: $nginx_role_run
- name: Create CMS log target directory
file: path={{log_base_dir}}/cms state=directory owner=syslog group=adm mode=2770
......
......@@ -16,8 +16,10 @@
- lms-preview-env
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-preview
when_set: $nginx_role_run
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-preview-backend
when_set: $nginx_role_run
# Creates LMS Preview upstart file
- include: ../../gunicorn/tasks/upstart.yml service_variant=lms-preview
......@@ -16,10 +16,12 @@
- cms-env
- cms
- update
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-xml
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-xml
when_set: $nginx_role_run
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-xml-backend
when_set: $nginx_role_run
# Creates upstart file
- include: ../../gunicorn/tasks/upstart.yml service_variant=lms-xml
......@@ -14,6 +14,10 @@
- update
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms
when_set: $nginx_role_run
- include: ../../nginx/tasks/nginx_site.yml state=link site_name=lms-backend
when_set: $nginx_role_run
# Creates LMS upstart file
- include: ../../gunicorn/tasks/upstart.yml service_variant=lms
......@@ -60,4 +60,11 @@
tags:
- nginx
- update
- name: Register the fact that nginx has run
command: echo True
register: nginx_role_run
tags:
- nginx
- update
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment