2015-10-04 04:19:50 +08:00
|
|
|
---
|
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 }}"
|
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:
|
|
|
|
- inventory_hostname in groups['kube-master']
|
2020-04-15 14:48:02 +08:00
|
|
|
|
|
|
|
- name: Flannel | Set CNI directory permissions
|
|
|
|
file:
|
|
|
|
path: /opt/cni/bin
|
|
|
|
state: directory
|
|
|
|
owner: kube
|
|
|
|
recurse: true
|
|
|
|
mode: 0755
|
|
|
|
register: cni_bin_dir
|
|
|
|
|
|
|
|
- name: Flannel | Copy CNI plugins
|
|
|
|
unarchive:
|
|
|
|
src: "{{ local_release_dir }}/cni-plugins-linux-{{ image_arch }}-{{ cni_version }}.tgz"
|
|
|
|
dest: "/opt/cni/bin"
|
|
|
|
mode: 0755
|
|
|
|
remote_src: yes
|