From 124808ca05cb7bb16a734e51e35755697d00418e Mon Sep 17 00:00:00 2001 From: alecsandru Date: Sat, 4 May 2024 16:56:28 +0000 Subject: [PATCH] Update 'k8s/setup_calico.yml' --- k8s/setup_calico.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/k8s/setup_calico.yml b/k8s/setup_calico.yml index 051c1e2..2e0a0b2 100644 --- a/k8s/setup_calico.yml +++ b/k8s/setup_calico.yml @@ -4,8 +4,12 @@ # become_method: sudo # become_user: root tasks: + - name: Check if Calico is installed + shell: "k get ns | grep tigera | wc -l" + register: NS_COUNT - name: Install Calico Operator shell: "kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.27.3/manifests/tigera-operator.yaml" + when: NS_COUNT.stdout|int < 1 - name: Create Calico setup dir file: path: $HOME/calico