diff --git a/tasks/main.yml b/tasks/main.yml
index 47bdfe61beb841b7ab5bab88bf56b07bf55513a0..cd4ae8c08ad1854c299aa8faaa2e5a68d36d0be0 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -22,4 +22,4 @@
       tags:
         - always
 
-  when: not excluded_roles or "apache" not in excluded_roles and role_apache_completed is not defined
+  when: (not excluded_roles or "apache" not in excluded_roles) and role_apache_completed is not defined