diff --git a/handlers/main.yml b/handlers/main.yml index 32c38c8..441f519 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,2 +1,10 @@ --- # 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 + diff --git a/tasks/supervisor.yaml b/tasks/supervisor.yaml index eb15b95..f511c2c 100644 --- a/tasks/supervisor.yaml +++ b/tasks/supervisor.yaml @@ -22,3 +22,4 @@ - name: upload supervisor configuration to web server home template: src=supervisor/app_supervisor.conf dest=/etc/supervisor/conf.d/{{ supervisor_app_config }} sudo: yes + notify: restart supervisord diff --git a/tasks/uwsgi.yaml b/tasks/uwsgi.yaml index 32e2a83..2381cb0 100644 --- a/tasks/uwsgi.yaml +++ b/tasks/uwsgi.yaml @@ -6,7 +6,3 @@ - name: configure app on uwsgi server template: src=uwsgi/app_uwsgi.ini dest={{ uwsgi_config }}/{{ uwsgi_app_ini }} sudo: yes - -- name: restart uwsgi server - supervisorctl: name=uwsgi state=restarted config=/etc/supervisor/supervisor.conf - sudo: yes