Remove duplicate webapp home variable, to simplify setup.
Remove references to Rookeries and rename variables, to make role useful outside of the context of Rookeries.
This commit is contained in:
parent
2e280e0ebc
commit
862d73268a
|
@ -3,13 +3,14 @@
|
|||
apt: pkg=nginx-full state=present
|
||||
sudo: yes
|
||||
|
||||
# TODO Look at using templated configuration
|
||||
- name: configure nginx
|
||||
copy: src=nginx/{{ rookeries_nginx_conf }} dest=/etc/nginx/sites-available
|
||||
copy: src=nginx/{{ app_nginx_conf }} dest=/etc/nginx/sites-available
|
||||
|
||||
- name: enable the rookeries nginx configuration
|
||||
- name: enable the copied over nginx configuration
|
||||
file: state=link
|
||||
src=/etc/nginx/sites-available/{{ rookeries_nginx_conf }}
|
||||
path=/etc/nginx/sites-enabled/{{ rookeries_nginx_conf }}
|
||||
src=/etc/nginx/sites-available/{{ app_nginx_conf }}
|
||||
path=/etc/nginx/sites-enabled/{{ app_nginx_conf }}
|
||||
sudo: yes
|
||||
|
||||
- name: disable the default page configuration
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
---
|
||||
- name: install Python setuptools dependencies
|
||||
- name: install python dev dependencies
|
||||
sudo: yes
|
||||
apt: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- python-dev
|
||||
- python-setuptools
|
||||
|
||||
- name: bootstrap PIP using setuptools
|
||||
- name: bootstrap pip using setuptools
|
||||
sudo: yes
|
||||
easy_install: name=pip
|
||||
|
||||
- name: install Python virtualenv
|
||||
- name: install virtualenv
|
||||
sudo: yes
|
||||
pip: name=virtualenv
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
pip: name=uwsgi virtualenv={{ uwsgi_venv }} version=2.0
|
||||
sudo: yes
|
||||
|
||||
- name: upload rookeries configuration
|
||||
copy: src=uwsgi/{{ rookeries_uwsgi_ini }} dest={{ uwsgi_config }}
|
||||
- name: upload app's uwsgi configuration
|
||||
copy: src=uwsgi/{{ uwsgi_ini }} dest={{ uwsgi_config }}
|
||||
sudo: yes
|
||||
|
||||
- name: restart uwsgi server
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
/var/log/supervisor: logs/supervisor
|
||||
sudo: yes
|
||||
|
||||
- name: add user to www-data
|
||||
- name: add user to webserver group
|
||||
user: name={{ user }} append=yes groups={{ web_server_group }}
|
||||
sudo: yes
|
||||
|
|
|
@ -2,9 +2,14 @@
|
|||
# vars file for ansible-nginx-uwsgi-supervisor
|
||||
|
||||
# TODO Make more configurable and flexible
|
||||
# NGINX
|
||||
rookeries_nginx_conf: rookeries-uwsgi_nginx.conf
|
||||
|
||||
# Web app home + group
|
||||
web_app_home: /srv/www
|
||||
web_server_group: www-data
|
||||
user: "{{ ansible_env.SUDO_USER }}"
|
||||
|
||||
# NGINX
|
||||
app_nginx_conf: rookeries-uwsgi_nginx.conf
|
||||
|
||||
# Supervisor
|
||||
# TODO Allow for multiple supervisord configurations
|
||||
|
@ -12,13 +17,7 @@ supervisor_configs:
|
|||
# - mailsink_supervisor.conf
|
||||
- rookeries_supervisor.conf
|
||||
|
||||
web_server_home: /srv/www
|
||||
|
||||
# UWSGI
|
||||
uwsgi_venv: "{{ web_server_home }}/virtualenvs/uwsgi"
|
||||
uwsgi_config: "{{ web_server_home }}/config/uwsgi"
|
||||
rookeries_uwsgi_ini: rookeries-uwsgi.ini
|
||||
|
||||
# Web folders
|
||||
user: "{{ ansible_env.SUDO_USER }}"
|
||||
web_app_home: /srv/www
|
||||
uwsgi_venv: "{{ web_app_home }}/virtualenvs/uwsgi"
|
||||
uwsgi_config: "{{ web_app_home }}/config/uwsgi"
|
||||
uwsgi_ini: rookeries-uwsgi.ini
|
||||
|
|
Loading…
Reference in New Issue