32 lines
1.0 KiB
YAML
32 lines
1.0 KiB
YAML
---
|
|
- name: setup webapp deployment folder with the correct permissions
|
|
file: path={{ web_root_path }} state=directory
|
|
owner={{ web_server_group }} group={{ web_server_group }} mode=0774
|
|
sudo: yes
|
|
|
|
- name: setup webapp deployment configuration + log folders with the correct permissions
|
|
file: path={{ web_root_path }}/{{ item }} state=directory
|
|
owner={{ web_server_group }} group={{ web_server_group }} mode=0774
|
|
with_items:
|
|
- config
|
|
- config/uwsgi
|
|
- logs
|
|
- virtualenvs
|
|
sudo: yes
|
|
|
|
- name: link remote folders with webapp home folder
|
|
file: state=link
|
|
path={{ web_root_path }}/{{ item.value }}
|
|
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
|
|
|
|
- name: add user to webserver group
|
|
user: name={{ web_user }} append=yes groups={{ web_server_group }}
|
|
sudo: yes
|