Fix check mode failure

If using this role for the first time in check mode, the role bombs out and fails because the nginx service doesn't exist (which make sense since it hasn't installed nginx yet due to check mode).

This change lets check mode keep running.
pull/121/head
Jesse Morgan 7 years ago committed by GitHub
parent 6f2b69b9b5
commit 2ba8886160
  1. 1
      tasks/main.yml

@ -37,3 +37,4 @@
- name: Ensure nginx is started and enabled to start at boot.
service: name=nginx state=started enabled=yes
when: not ansible_check_mode