ansible-role-nginx/handlers/main.yml
Aleksandr Vinokurov 5294d77fa3 Remove new config validation, Fix #41
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.
2016-01-22 12:56:30 +03:00

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