roles/k3s: add templates/cni_install.sh

This commit is contained in:
Haitao Pan 2023-05-28 18:24:03 +08:00
parent 780b95e99b
commit 3370b09c77
2 changed files with 11 additions and 1 deletions

View File

@ -8,3 +8,9 @@
name: k3s
vars:
group: master
pod_cidr: '10.16.0.0/16'
pod_gateway: '10.16.0.1'
svc_cidr: '10.96.0.0/16'
join_cidr: '100.64.0.0/16'
cni_iface: 'eth0'
cni_tunnel: 'geneve'

View File

@ -2,8 +2,12 @@
script: files/setup.sh
when: inventory_hostname in groups[group]
- name: Sync K3S CNI Config
template: src=templates/cni_install.sh dest=/tmp/ owner=root group=root mode=0644
when: inventory_hostname in groups[group]
- name: Setup K3S CNI
script: files/setup-cni-kubeovn.sh {{ ingress_ip }}
shell: 'sh /tmp/cni_install.sh'
when: inventory_hostname in groups[group]
- name: Setup K3S Ingress