From c2902fa784c5be3bf72d6690f1fa789ec065b2e3 Mon Sep 17 00:00:00 2001 From: alecsandru Date: Sat, 4 May 2024 09:44:39 +0000 Subject: [PATCH] Update 'install_kubetools.yml' --- install_kubetools.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/install_kubetools.yml b/install_kubetools.yml index 5f0fe31..2fe478f 100644 --- a/install_kubetools.yml +++ b/install_kubetools.yml @@ -56,10 +56,15 @@ with_items: - "kubelet" - "kubeadm" - - name: ensure /etc/default/kubelet exists - file: + - name: Check /etc/default/kubelet + stat: path: /etc/default/kubelet - state: file + register: kubelet_defaults + - name: Create /etc/default/kubelet + copy: + dest: /etc/default/kubelet + content: "KUBELET_EXTRA_ARGS=\"--container-runtime-endpoint=unix:///run/containerd/containerd.sock\"" + when: not kubelet_defaults.stat.exists - name: Set containerd in extraargs blockinfile: dest: /etc/default/kubelet