Add restarting of supervisord and uwsgi app into handlers to allow for more dynamic reuse of role calls.
This commit is contained in:
parent
5d330c0767
commit
ec7f841a7c
|
@ -1,2 +1,10 @@
|
||||||
---
|
---
|
||||||
# handlers file for ansible-nginx-uwsgi-supervisor
|
# handlers file for ansible-nginx-uwsgi-supervisor
|
||||||
|
- name: restart uwsgi app
|
||||||
|
supervisorctl: name={{ uwsgi_service_name }} state=restarted config=/etc/supervisor/supervisor.conf
|
||||||
|
sudo: yes
|
||||||
|
|
||||||
|
- name: restart supervisord
|
||||||
|
service: name=supervisor state=restarted
|
||||||
|
sudo: yes
|
||||||
|
|
||||||
|
|
|
@ -22,3 +22,4 @@
|
||||||
- name: upload supervisor configuration to web server home
|
- name: upload supervisor configuration to web server home
|
||||||
template: src=supervisor/app_supervisor.conf dest=/etc/supervisor/conf.d/{{ supervisor_app_config }}
|
template: src=supervisor/app_supervisor.conf dest=/etc/supervisor/conf.d/{{ supervisor_app_config }}
|
||||||
sudo: yes
|
sudo: yes
|
||||||
|
notify: restart supervisord
|
||||||
|
|
|
@ -6,7 +6,3 @@
|
||||||
- name: configure app on uwsgi server
|
- name: configure app on uwsgi server
|
||||||
template: src=uwsgi/app_uwsgi.ini dest={{ uwsgi_config }}/{{ uwsgi_app_ini }}
|
template: src=uwsgi/app_uwsgi.ini dest={{ uwsgi_config }}/{{ uwsgi_app_ini }}
|
||||||
sudo: yes
|
sudo: yes
|
||||||
|
|
||||||
- name: restart uwsgi server
|
|
||||||
supervisorctl: name=uwsgi state=restarted config=/etc/supervisor/supervisor.conf
|
|
||||||
sudo: yes
|
|
||||||
|
|
Loading…
Reference in New Issue