Add parameters to uwsgi app role for deployment. Remove duplicate code.
This commit is contained in:
parent
013aa699f5
commit
ad04c4cc01
|
@ -1,4 +1,3 @@
|
|||
---
|
||||
- include: deployment/rookeries_install.yaml
|
||||
- include: deployment/uwsgi.yaml
|
||||
- include: deployment/email_server.yaml
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
---
|
||||
- hosts: all
|
||||
vars:
|
||||
web_server_home: /srv/www
|
||||
web_server_group: www-data
|
||||
uwsgi_venv: "{{ web_server_home }}/virtualenvs/uwsgi"
|
||||
uwsgi_config: "{{ web_server_home }}/config/uwsgi"
|
||||
rookeries_uwsgi_ini: rookeries-uwsgi.ini
|
||||
tasks:
|
||||
|
||||
- name: install uwsgi server
|
||||
pip: name=uwsgi virtualenv={{ uwsgi_venv }} version=2.0
|
||||
|
||||
- name: upload rookeries configuration
|
||||
copy: src=../config/uwsgi/{{ rookeries_uwsgi_ini }} dest={{ uwsgi_config }}
|
||||
|
||||
- name: restart uwsgi server
|
||||
supervisorctl: name=uwsgi state=restarted config=/etc/supervisor/supervisor.conf
|
|
@ -3,7 +3,8 @@
|
|||
sudo: yes
|
||||
|
||||
roles:
|
||||
- ansible-nginx-uwsgi-supervisor
|
||||
- { role: ansible-nginx-uwsgi-supervisor, app_name: rookeries, nginx_hostname: localhost,
|
||||
uwsgi_port: 8001, uwsgi_app_executable: "rookeries:make_rookeries_app()" }
|
||||
tasks:
|
||||
- include: pre_deployment/base_linux.yaml
|
||||
- include: pre_deployment/mysql_db.yaml
|
||||
|
|
Loading…
Reference in New Issue