2015-10-04 04:19:50 +08:00
|
|
|
---
|
2022-12-19 07:39:43 +08:00
|
|
|
|
|
|
|
- name: Flannel | Stop if kernel version is too low for Flannel Wireguard encryption
|
|
|
|
assert:
|
|
|
|
that: ansible_kernel.split('-')[0] is version('5.6.0', '>=')
|
|
|
|
when:
|
|
|
|
- kube_network_plugin == 'flannel'
|
|
|
|
- flannel_backend_type == 'wireguard'
|
|
|
|
- not ignore_assert_errors
|
|
|
|
|
2017-11-03 12:20:23 +08:00
|
|
|
- name: Flannel | Create Flannel manifests
|
2017-08-25 15:07:50 +08:00
|
|
|
template:
|
2019-05-03 05:24:21 +08:00
|
|
|
src: "{{ item.file }}.j2"
|
|
|
|
dest: "{{ kube_config_dir }}/{{ item.file }}"
|
2022-01-09 17:51:12 +08:00
|
|
|
mode: 0644
|
2017-11-03 12:20:23 +08:00
|
|
|
with_items:
|
|
|
|
- {name: flannel, file: cni-flannel-rbac.yml, type: sa}
|
|
|
|
- {name: kube-flannel, file: cni-flannel.yml, type: ds}
|
|
|
|
register: flannel_node_manifests
|
|
|
|
when:
|
2021-03-24 08:26:05 +08:00
|
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|