2014-11-26 22:04:01 -05:00
|
|
|
---
|
2015-01-07 18:23:43 -05:00
|
|
|
- name: setup webapp deployment folder with the correct permissions
|
2015-01-13 22:45:07 -05:00
|
|
|
file: path={{ web_root_path }} state=directory
|
|
|
|
owner={{ web_server_group }} group={{ web_server_group }} mode=0774
|
2015-01-07 18:23:43 -05:00
|
|
|
sudo: yes
|
2014-11-26 22:04:01 -05:00
|
|
|
|
2015-01-07 18:23:43 -05:00
|
|
|
- name: setup webapp deployment configuration + log folders with the correct permissions
|
2015-01-13 22:45:07 -05:00
|
|
|
file: path={{ web_root_path }}/{{ item }} state=directory
|
2015-01-07 18:23:43 -05:00
|
|
|
owner={{ web_server_group }} group={{ web_server_group }} mode=0774
|
|
|
|
with_items:
|
|
|
|
- config
|
|
|
|
- config/uwsgi
|
|
|
|
- logs
|
|
|
|
- virtualenvs
|
|
|
|
sudo: yes
|
2014-11-26 22:04:01 -05:00
|
|
|
|
2015-01-08 18:12:04 -05:00
|
|
|
- name: link remote folders with webapp home folder
|
2015-01-07 18:23:43 -05:00
|
|
|
file: state=link
|
2015-01-13 22:45:07 -05:00
|
|
|
path={{ web_root_path }}/{{ item.value }}
|
2015-01-07 18:23:43 -05:00
|
|
|
src={{ item.key }}
|
|
|
|
owner={{ web_server_group }} group={{ web_server_group }} mode=0774
|
|
|
|
with_dict:
|
|
|
|
/etc/nginx: config/nginx
|
|
|
|
/etc/supervisor: config/supervisor
|
|
|
|
/var/log/nginx: logs/nginx
|
|
|
|
/var/log/supervisor: logs/supervisor
|
|
|
|
sudo: yes
|
2014-12-03 22:09:38 -05:00
|
|
|
|
2015-01-09 07:46:01 -05:00
|
|
|
- name: add user to webserver group
|
2015-01-13 22:45:07 -05:00
|
|
|
user: name={{ web_user }} append=yes groups={{ web_server_group }}
|
2015-01-07 18:23:43 -05:00
|
|
|
sudo: yes
|