mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2024-11-14 10:16:05 +01:00
5294d77fa3
NOTE: current nginx config validation process breaks SELinux context for pid file, as described in #41 Restart of nginx is not needed for configuration changes and is replaced with reload, which will validate config before applying it, leaving running nginx process untouched in case of any validation errors. Restart handler left in support.
11 lines
228 B
YAML
11 lines
228 B
YAML
---
|
|
- name: restart nginx
|
|
service: name=nginx state=restarted
|
|
|
|
- name: validate nginx configuration
|
|
command: nginx -t -c /etc/nginx/nginx.conf
|
|
changed_when: False
|
|
|
|
- name: reload nginx
|
|
service: name=nginx state=reloaded
|