Update 'k8s/setup_calico.yml'
This commit is contained in:
@@ -4,8 +4,12 @@
|
|||||||
# become_method: sudo
|
# become_method: sudo
|
||||||
# become_user: root
|
# become_user: root
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Check if Calico is installed
|
||||||
|
shell: "k get ns | grep tigera | wc -l"
|
||||||
|
register: NS_COUNT
|
||||||
- name: Install Calico Operator
|
- name: Install Calico Operator
|
||||||
shell: "kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.27.3/manifests/tigera-operator.yaml"
|
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
|
- name: Create Calico setup dir
|
||||||
file:
|
file:
|
||||||
path: $HOME/calico
|
path: $HOME/calico
|
||||||
|
Reference in New Issue
Block a user