Add restarting of supervisord and uwsgi app into handlers to allow for more dynamic reuse of role calls.

This commit is contained in:
Dorian 2015-01-15 18:07:41 -05:00
parent 5d330c0767
commit ec7f841a7c
3 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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