diff --git a/prepare_k8s.yml b/prepare_k8s.yml index 6bbfeb5..07e7763 100644 --- a/prepare_k8s.yml +++ b/prepare_k8s.yml @@ -16,10 +16,16 @@ ansible.builtin.file: path: /etc/containerd state: directory + - name: Get containerd default config + command: containerd config default + register: containerd_config + - name: Create containerd config + copy: + dst: /etc/containerd/config.toml + content: "{{containerd_config}}" - name: Configure containerd command: "{{ item }} chdir=/etc/" with_items: - - containerd config default | tee /etc/containerd/config.toml - sed -i 's/ SystemdCgroup = false/ SystemdCgroup = true/' /etc/containerd/config.toml - name: Install CNI Plugins command: "{{ item }} chdir=/tmp"