21 lines
681 B
YAML
21 lines
681 B
YAML
---
|
|
- name: install uwsgi server
|
|
pip: name=uwsgi virtualenv={{ uwsgi_venv }} version=2.0
|
|
sudo: yes
|
|
|
|
- name: configure app on uwsgi server
|
|
template: src=app_uwsgi.ini dest={{ uwsgi_config_path }}/{{ uwsgi_app_ini }}
|
|
sudo: yes
|
|
notify: restart uwsgi app
|
|
|
|
- name: configure nginx app with uwsgi specific block.
|
|
blockinfile:
|
|
dest: /etc/nginx/sites-available/{{ uwsgi_app_nginx_config }}
|
|
insertafter: "# Include your setup to connect to the webapp setup here."
|
|
marker: "# -- {mark} UWSGI App config for {{ uwsgi_app_name }} --"
|
|
block: |
|
|
include uwsgi_params;
|
|
uwsgi_pass 127.0.0.1:{{ uwsgi_app_port }};
|
|
sudo: yes
|
|
notify: restart nginx
|