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 }}