k8s-sig-cluster-lifecycleawskubesprayhigh-availabilityansiblekubernetes-clustergcekubernetesbare-metal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.1 KiB
49 lines
1.1 KiB
---
|
|
- name: Prepare
|
|
hosts: all
|
|
become: true
|
|
roles:
|
|
- role: kubespray-defaults
|
|
- role: bootstrap-os
|
|
- role: adduser
|
|
user: "{{ addusers.kube }}"
|
|
tasks:
|
|
- name: Download CNI
|
|
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
|
|
- role: network_plugin/cni
|
|
- role: container-engine/crictl
|
|
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_owner }}"
|
|
mode: "0755"
|
|
- name: Setup CNI
|
|
copy:
|
|
src: "{{ item }}"
|
|
dest: "/etc/cni/net.d/{{ item }}"
|
|
owner: root
|
|
mode: "0644"
|
|
with_items:
|
|
- 10-mynet.conf
|