2021-03-03 23:27:20 +08:00
|
|
|
---
|
|
|
|
- name: NetworkManager | Ensure NetworkManager conf.d dir
|
|
|
|
file:
|
|
|
|
path: "/etc/NetworkManager/conf.d"
|
|
|
|
state: directory
|
2024-08-28 13:30:56 +08:00
|
|
|
recurse: true
|
2021-03-03 23:27:20 +08:00
|
|
|
|
|
|
|
- name: NetworkManager | Prevent NetworkManager from managing Calico interfaces (cali*/tunl*/vxlan.calico)
|
|
|
|
copy:
|
|
|
|
content: |
|
|
|
|
[keyfile]
|
2023-01-05 20:29:58 +08:00
|
|
|
unmanaged-devices+=interface-name:cali*;interface-name:tunl*;interface-name:vxlan.calico;interface-name:vxlan-v6.calico
|
2021-03-03 23:27:20 +08:00
|
|
|
dest: /etc/NetworkManager/conf.d/calico.conf
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0644"
|
2021-03-03 23:27:20 +08:00
|
|
|
when:
|
|
|
|
- kube_network_plugin == "calico"
|
|
|
|
notify: Preinstall | reload NetworkManager
|
|
|
|
|
|
|
|
# TODO: add other network_plugin interfaces
|
|
|
|
|
|
|
|
- name: NetworkManager | Prevent NetworkManager from managing K8S interfaces (kube-ipvs0/nodelocaldns)
|
|
|
|
copy:
|
|
|
|
content: |
|
|
|
|
[keyfile]
|
|
|
|
unmanaged-devices+=interface-name:kube-ipvs0;interface-name:nodelocaldns
|
|
|
|
dest: /etc/NetworkManager/conf.d/k8s.conf
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0644"
|
2021-03-03 23:27:20 +08:00
|
|
|
notify: Preinstall | reload NetworkManager
|