You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
773 B
YAML

---
################################################################################
# calico
# https://projectcalico.docs.tigera.io/getting-started/kubernetes/self-managed-onprem/onpremises
# https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network
################################################################################
- name: Check if calico is already deployed by getting all pods.
command: kubectl get pods --all-namespaces
ignore_errors: true
changed_when: false
register: pods
- name: Deploy Calico if not already installed.
command: "kubectl apply -f {{ calico_manifest_url }}"
register: calico_result
changed_when: "'created' in calico_result.stdout"
when: "'calico' not in pods.stdout"