2014-11-18 08:24:39 -05:00
|
|
|
---
|
|
|
|
- hosts: all
|
|
|
|
sudo: yes
|
2014-11-19 16:27:37 -05:00
|
|
|
vars:
|
|
|
|
rookeries_nginx_conf: rookeries-uwsgi.conf
|
2014-11-18 08:24:39 -05:00
|
|
|
tasks:
|
|
|
|
|
2014-11-19 16:27:37 -05:00
|
|
|
- name: Setup nginx webserver
|
|
|
|
apt: pkg=nginx-full state=present
|
2014-11-18 08:24:39 -05:00
|
|
|
|
|
|
|
- name: Configure nginx
|
2014-11-19 16:27:37 -05:00
|
|
|
copy: src=../config/nginx/{{ rookeries_nginx_conf }} dest=/etc/nginx/sites-available
|
2014-11-18 08:24:39 -05:00
|
|
|
|
|
|
|
- name: Link the rookeries uwsgi file
|
|
|
|
file: state=link
|
2014-11-19 16:27:37 -05:00
|
|
|
src=/etc/nginx/sites-available/{{ rookeries_nginx_conf }}
|
|
|
|
path=/etc/nginx/sites-enabled/{{ rookeries_nginx_conf }}
|
2014-11-18 08:24:39 -05:00
|
|
|
|
|
|
|
- name: Unlink the default page
|
|
|
|
file: state=absent path=/etc/nginx/sites-enabled/default
|
|
|
|
|
|
|
|
- name: Run nginx service
|
|
|
|
command: service nginx restart
|
|
|
|
|
2014-11-19 16:27:37 -05:00
|
|
|
# TODO Verify if still required for pip package deployment
|
|
|
|
# - name: Setup webapp deployment folder with the correct permissions
|
|
|
|
# file: path=/var/www state=directory owner=vagrant group=www-data mode=0774
|
|
|
|
#
|
|
|
|
# - name: Add vagrant user to www-data
|
|
|
|
# user: name=vagrant append=yes groups=www-data
|