From a4955cae1ec31f91bde75d08ec905036fda06c48 Mon Sep 17 00:00:00 2001 From: Julien Girardin Date: Thu, 7 Dec 2023 11:02:54 +0100 Subject: [PATCH] Restart kubelet only after real kubelet package change --- roles/packages/tasks/pkg_Debian.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/packages/tasks/pkg_Debian.yml b/roles/packages/tasks/pkg_Debian.yml index 5ccfd15..f9313a4 100644 --- a/roles/packages/tasks/pkg_Debian.yml +++ b/roles/packages/tasks/pkg_Debian.yml @@ -32,4 +32,7 @@ service: name: 'kubelet' state: restarted - when: _kubelet_installed is changed and not ansible_check_mode + when: + - _kubelet_installed is changed + - "kubelet" in kube_package_dict + - not ansible_check_mode