This commit is contained in:
2026-03-04 21:34:23 +01:00
parent 0ba2c1a676
commit ff9fbb3f20
2 changed files with 8 additions and 2 deletions

View File

@@ -198,7 +198,12 @@
- name: Install Flannel CNI
become_user: "{{ ansible_user }}"
command: kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
when: inventory_hostname.endswith('-vm01.home.lan')
when: inventory_hostname.endswith('-vm01.home.lan') and net_driver == 'flannel'
- name: Install Calico CNI
become_user: "{{ ansible_user }}"
command: kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/master/manifests/calico.yaml
when: inventory_hostname.endswith('-vm01.home.lan') and net_driver == 'calico'
- name: Get join command
command: kubeadm token create --print-join-command