mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2025-02-16 01:11:29 +01:00
Ensuring all instances that notify 'restart nginx' also validate first
This commit is contained in:
parent
fd6b8c8e6b
commit
a248416a4d
@ -27,7 +27,9 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
validate: 'nginx -t -c %s'
|
validate: 'nginx -t -c %s'
|
||||||
notify: restart nginx
|
notify:
|
||||||
|
- validate nginx configuration
|
||||||
|
- restart nginx
|
||||||
|
|
||||||
- name: Ensure nginx is started and enabled to start at boot.
|
- name: Ensure nginx is started and enabled to start at boot.
|
||||||
service: name=nginx state=started enabled=yes
|
service: name=nginx state=started enabled=yes
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
path: "{{ nginx_default_vhost_path }}"
|
path: "{{ nginx_default_vhost_path }}"
|
||||||
state: absent
|
state: absent
|
||||||
when: nginx_remove_default_vhost
|
when: nginx_remove_default_vhost
|
||||||
notify: restart nginx
|
notify:
|
||||||
|
- validate nginx configuration
|
||||||
|
- restart nginx
|
||||||
|
|
||||||
- name: Add managed vhost config file (if any vhosts are configured).
|
- name: Add managed vhost config file (if any vhosts are configured).
|
||||||
template:
|
template:
|
||||||
|
Loading…
Reference in New Issue
Block a user