diff --git a/roles/network_plugin/tasks/calico.yml b/roles/network_plugin/tasks/calico.yml
index e025e04a865bc4635365c997532b0e4ee69454f5..65e6ba290332a6d325b601c96ad313ffbec7745d 100644
--- a/roles/network_plugin/tasks/calico.yml
+++ b/roles/network_plugin/tasks/calico.yml
@@ -38,7 +38,7 @@
 
 - name: Calico | Disable node mesh
   shell: calicoctl bgp node-mesh off
-  when: peer_with_router and inventory_hostname in groups['kube-node']
+  when: peer_with_router is defined and peer_with_router and inventory_hostname in groups['kube-node']
 
 - name: Calico | Configure peering with router(s)
   shell: calicoctl node bgp peer add {{ item.router_id }} as {{ item.as }}