another when: not ansible_check_mode addition

If nginx is not yet installed, these will fail in check mode.
pull/121/head
Jesse Morgan 7 years ago committed by GitHub
parent 2ba8886160
commit 42ade7286f
  1. 2
      handlers/main.yml

@ -1,6 +1,7 @@
---
- name: restart nginx
service: name=nginx state=restarted
when: not ansible_check_mode
- name: validate nginx configuration
command: nginx -t -c /etc/nginx/nginx.conf
@ -8,3 +9,4 @@
- name: reload nginx
service: name=nginx state=reloaded
when: not ansible_check_mode