Update 'prepare_k8s.yml'

This commit is contained in:
2024-05-03 20:15:24 +00:00
parent d6c519cf05
commit bd863cfcb4

View File

@@ -12,10 +12,13 @@
package: package:
name: runc name: runc
state: present state: present
- name: Creates directory
ansible.builtin.file:
path: /etc/containerd
state: directory
- name: Configure containerd - name: Configure containerd
command: "{{ item }} chdir=/etc/" command: "{{ item }} chdir=/etc/"
with_items: with_items:
- mkdir /etc/containerd
- sudo containerd config default | tee /etc/containerd/config.toml - sudo containerd config default | tee /etc/containerd/config.toml
- sudo sed -i 's/ SystemdCgroup = false/ SystemdCgroup = true/' /etc/containerd/config.toml - sudo sed -i 's/ SystemdCgroup = false/ SystemdCgroup = true/' /etc/containerd/config.toml
- name: Install CNI Plugins - name: Install CNI Plugins