diff --git a/tasks/main.yml b/tasks/main.yml
index cf351c77b6b12f1748386f7fe7d3eff051205e31..6216220c92aa0bd6b05d3482f73c0314c47539d6 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -53,4 +53,4 @@
       tags:
         - always
 
-  when: not excluded_roles or "commonconnect" not in excluded_roles and role_commonconnect_completed is not defined
+  when: (not excluded_roles or "commonconnect" not in excluded_roles) and role_commonconnect_completed is not defined