From 8218ac9becaec269168b6b372246f0fddf64de4c Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Tue, 21 Jul 2015 07:35:26 -0400 Subject: [PATCH] Expose the virtualenv configurations in response to symlink deployment work in ansible-rookeries role. --- README.md | 13 ++++++++++++- defaults/main.yml | 4 ++++ vars/main.yml | 6 +----- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 059512d..982523b 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,19 @@ into sections and described below: - app_uwsgi_envs: - (Optional) A dictionary of environment variables to pass into an app. - Default: empty dictionary + +### Virtual Environments -### General Web: +**NEW** - On occassion it is necessary to change the setup of the virtual environments on a system. + +- virtualenv_root_path: + - Path to where the virtual environments are installed + - Default: web_root_path/virtualenvs +- app_venv: + - Path to the application's virtualenv. + - Default: virtualenv_root_path/app_name + +### General Web These variables are not as crucial to configure. They do give good defaults for configuring the system in a consistent, POSIX/LSB-friendly and user-friendly manner. See the section on Default File Structure for more details. diff --git a/defaults/main.yml b/defaults/main.yml index d45601c..358d204 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -16,3 +16,7 @@ app_nginx_static_path: "{{ app_root_path }}/{{ app_name }}/static/" app_uwsgi_port: 8000 app_uwsgi_executable: "app:make_wsgi_app()" app_uwsgi_envs: {} + +# Virtualenvs +virtualenv_root_path: "{{ web_root_path }}/virtualenvs" +app_venv: "{{ virtualenv_root_path }}/{{ app_name }}" diff --git a/vars/main.yml b/vars/main.yml index bd0d4b3..8f60a11 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -4,11 +4,6 @@ # User web_user: "{{ ansible_env.SUDO_USER }}" -# Virtualenvs -virtualenv_root_path: "{{ web_root_path }}/virtualenvs" -uwsgi_venv: "{{ virtualenv_root_path }}/uwsgi" -app_venv: "{{ virtualenv_root_path }}/{{ app_name }}" - # NGINX nginx_app_config: "{{ app_name }}_uwsgi_nginx.conf" @@ -16,6 +11,7 @@ nginx_app_config: "{{ app_name }}_uwsgi_nginx.conf" supervisor_app_config: "{{ app_name }}_supervisor.conf" # UWSGI +uwsgi_venv: "{{ virtualenv_root_path }}/uwsgi" uwsgi_config_path: "{{ web_root_path }}/config/uwsgi" uwsgi_app_ini: "{{ app_name }}_uwsgi.ini" uwsgi_app_service_name: "{{ app_name }}_uwsgi"