From 2ba88861600397ef82d7b3a6f3d22e56fa979f90 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Wed, 16 Aug 2017 09:04:13 -0400 Subject: [PATCH] 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. --- tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/main.yml b/tasks/main.yml index 2363838..e4d3319 100644 --- a/tasks/main.yml +++ b/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