Change the nginx restart into a handler, to make it more reusable in other roles.
This commit is contained in:
parent
ec7f841a7c
commit
9682c28b0e
|
@ -8,3 +8,6 @@
|
||||||
service: name=supervisor state=restarted
|
service: name=supervisor state=restarted
|
||||||
sudo: yes
|
sudo: yes
|
||||||
|
|
||||||
|
- name: restart nginx
|
||||||
|
service: name=nginx state=restarted
|
||||||
|
sudo: yes
|
||||||
|
|
|
@ -16,10 +16,7 @@
|
||||||
- name: disable default configuration
|
- name: disable default configuration
|
||||||
file: state=absent path=/etc/nginx/sites-enabled/default
|
file: state=absent path=/etc/nginx/sites-enabled/default
|
||||||
sudo: yes
|
sudo: yes
|
||||||
|
notify: restart nginx
|
||||||
- name: restart nginx
|
|
||||||
service: name=nginx state=restarted
|
|
||||||
sudo: yes
|
|
||||||
|
|
||||||
- name: set nginx directories permissions
|
- name: set nginx directories permissions
|
||||||
file: path={{ item }} state=directory
|
file: path={{ item }} state=directory
|
||||||
|
|
Loading…
Reference in New Issue