From f6e4cc530c95b71d45f6bb0054ba7f4e7642b424 Mon Sep 17 00:00:00 2001
From: Smaine Kahlouch <smaine.kahlouch@arkena.com>
Date: Fri, 30 Oct 2015 16:18:39 +0100
Subject: [PATCH] manage default value for 'peer_with_router' var

---
 roles/network_plugin/tasks/calico.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/network_plugin/tasks/calico.yml b/roles/network_plugin/tasks/calico.yml
index e025e04a8..65e6ba290 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 }}
-- 
GitLab