From 125d6e5ca8b9520a9acfdadf42d69ea74b274b84 Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Tue, 21 Jul 2015 07:37:18 -0400 Subject: [PATCH] Fix virtualenv symlink for symlink deployment setup in role. --- meta/main.yml | 1 + tasks/rookeries_deployment.yaml | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index 2ebfb54..ad8c4ab 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -16,6 +16,7 @@ dependencies: - role: dorianpula.nginx-uwsgi-supervisor app_name: "{{ rookeries_app_name }}" app_root_path: "{{ rookeries_app_symlink }}" + app_venv: "{{ rookeries_venv_symlink }}" app_nginx_hostname: "{{ rookeries_app_hostname }}" app_uwsgi_port: "{{ rookeries_local_uwsgi_port }}" app_uwsgi_executable: "rookeries:make_rookeries_app()" diff --git a/tasks/rookeries_deployment.yaml b/tasks/rookeries_deployment.yaml index b179332..672624a 100644 --- a/tasks/rookeries_deployment.yaml +++ b/tasks/rookeries_deployment.yaml @@ -6,7 +6,11 @@ - name: upload + extract rookeries package to web server home unarchive: src={{ rookeries_package_path }} dest={{ web_root_path }} - sudo: yes + when: deploy_package.stat.exists + +- name: fix permissions on extracted web app + file: path={{ rookeries_deploy_dir }} owner={{ web_server_group }} group={{ web_server_group }} + state=directory recurse=yes when: deploy_package.stat.exists - name: install rookeries dependencies @@ -23,11 +27,6 @@ npm: path={{ rookeries_deploy_dir }} state=present registry=http://registry.npmjs.org/ when: deploy_package.stat.exists -- name: fix permissions on extracted web app - file: path={{ rookeries_deploy_dir }} owner={{ web_server_group }} group={{ web_server_group }} - state=directory recurse=yes - when: deploy_package.stat.exists - - name: add in symlink to deployed package. file: state=link src={{ rookeries_deploy_dir }} path={{ rookeries_app_symlink }} owner={{ web_server_group }} group={{ web_server_group }}