This commit is contained in:
2026-02-23 16:27:27 +01:00
parent 81740547f0
commit 8914854c68

View File

@@ -172,10 +172,13 @@
when: inventory_hostname == 'ubuntu24-vm01.home.lan'
- name: Install Flannel CNI
become: false
command: kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
when: inventory_hostname == 'ubuntu24-vm01.home.lan'
ignore_errors: true
ansible.builtin.command:
cmd: kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
when: inventory_hostname == "ubuntu24-vm01.home.lan"
register: flannel_result
changed_when: "'created' in flannel_result.stdout or 'configured' in flannel_result.stdout"
- name: Get join command
command: sudo kubeadm token create --print-join-command