2014-05-16 01:39:57 +00:00
|
|
|
---
|
|
|
|
- name: Install virtualenv
|
|
|
|
apt: name=python-virtualenv state=latest
|
|
|
|
- name: Install uwsgi from PyPI
|
2014-05-16 01:50:21 +00:00
|
|
|
pip: name=uWSGI
|
2014-05-16 01:39:57 +00:00
|
|
|
- name: Add uwsgi group
|
|
|
|
group: name=uwsgi state=present
|
|
|
|
- name: Add uwsgi user
|
|
|
|
user: name=uwsgi shell=/sbin/nologin createhome=no group=uwsgi password=$6$Qu5GfWUlAPXh$Ie8Fd9Vzl.PpaFciUbRCI4sIryI6i0rDE29Vf86/WYHgPSWG7x9IIkVU.tG1Mtfq2OM9IeH2IuvOKCcnErMgC1
|
|
|
|
- name: Copy over the uwsgi init script
|
|
|
|
copy: src=uwsgi.init dest=/etc/init.d/uwsgi backup=yes
|
|
|
|
- name: Make sure the init script is executable
|
|
|
|
file: path=/etc/init.d/uwsgi owner=root group=root mode=0755
|
|
|
|
- name: Make configuration directory
|
2014-05-16 01:54:12 +00:00
|
|
|
file: path=/etc/uwsgi/apps state=directory
|
2014-05-16 01:39:57 +00:00
|
|
|
- name: Make sure uwsgi starts on boot
|
|
|
|
service: name=uwsgi enabled=yes
|
|
|
|
notify:
|
|
|
|
- start uwsgi
|