2021-06-21 12:18:51 +00:00
|
|
|
---
|
|
|
|
- name: Prepare generic
|
|
|
|
hosts: all
|
|
|
|
become: true
|
|
|
|
roles:
|
|
|
|
- role: kubespray-defaults
|
|
|
|
- role: bootstrap-os
|
2021-07-12 07:00:47 +00:00
|
|
|
- role: adduser
|
2021-06-21 12:18:51 +00:00
|
|
|
user: "{{ addusers.kube }}"
|
|
|
|
tasks:
|
|
|
|
- include_tasks: "../../../../download/tasks/download_file.yml"
|
|
|
|
vars:
|
|
|
|
download: "{{ download_defaults | combine(downloads.cni) }}"
|
|
|
|
|
|
|
|
- name: Prepare container runtime
|
|
|
|
hosts: all
|
|
|
|
become: true
|
|
|
|
vars:
|
|
|
|
container_manager: containerd
|
|
|
|
kube_network_plugin: cni
|
|
|
|
roles:
|
|
|
|
- role: kubespray-defaults
|
2021-07-12 07:00:47 +00:00
|
|
|
- role: network_plugin/cni
|
|
|
|
- role: container-engine/crictl
|
2021-06-21 12:18:51 +00:00
|
|
|
tasks:
|
|
|
|
- name: Copy test container files
|
|
|
|
copy:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "/tmp/{{ item }}"
|
|
|
|
owner: root
|
|
|
|
mode: 0644
|
|
|
|
with_items:
|
|
|
|
- container.json
|
|
|
|
- sandbox.json
|
|
|
|
- name: Create /etc/cni/net.d directory
|
|
|
|
file:
|
|
|
|
path: /etc/cni/net.d
|
|
|
|
state: directory
|
|
|
|
owner: kube
|
|
|
|
mode: 0755
|
|
|
|
- name: Setup CNI
|
|
|
|
copy:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "/etc/cni/net.d/{{ item }}"
|
|
|
|
owner: root
|
|
|
|
mode: 0644
|
|
|
|
with_items:
|
|
|
|
- 10-mynet.conf
|