2014-11-18 08:24:39 -05:00
|
|
|
---
|
|
|
|
- hosts: all
|
2014-11-21 23:09:42 -05:00
|
|
|
sudo: yes
|
2014-11-19 19:20:27 -05:00
|
|
|
vars:
|
|
|
|
web_server_home: /srv/www
|
2014-11-20 18:05:34 -05:00
|
|
|
web_server_group: www-data
|
2014-11-19 19:20:27 -05:00
|
|
|
uwsgi_venv: "{{ web_server_home }}/uwsgi"
|
2014-11-20 18:05:34 -05:00
|
|
|
uwsgi_config: "{{ web_server_home }}/config/uwsgi"
|
2014-11-19 19:20:27 -05:00
|
|
|
rookeries_uwsgi_ini: rookeries-uwsgi.ini
|
2014-11-18 08:24:39 -05:00
|
|
|
tasks:
|
|
|
|
|
2014-11-20 08:09:15 -05:00
|
|
|
- name: PIP install UWSGI server into target virtualenv
|
2014-11-19 19:20:27 -05:00
|
|
|
pip: name=uwsgi virtualenv={{ uwsgi_venv }} version=2.0
|
|
|
|
|
2014-11-20 18:05:34 -05:00
|
|
|
- name: Setup webapp deployment configuration folder with the correct permissions
|
|
|
|
file: path={{ uwsgi_config }} state=directory
|
|
|
|
owner={{ ansible_env.SUDO_USER }} group={{ web_server_group }} mode=0774
|
2014-11-20 08:09:15 -05:00
|
|
|
|
2014-11-19 19:20:27 -05:00
|
|
|
- name: Upload rookeries UWSGI configuration to web server home
|
2014-11-20 18:05:34 -05:00
|
|
|
copy: src=../config/uwsgi/{{ rookeries_uwsgi_ini }} dest={{ uwsgi_config }}
|