From 024ce3f608e4694a608347a414e3e8686ca08d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Fri, 16 Feb 2024 23:14:16 +0000 Subject: [PATCH] fix conditional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- tasks/packagemgmt.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/packagemgmt.yml b/tasks/packagemgmt.yml index 8d1b8b90..92cc64e5 100644 --- a/tasks/packagemgmt.yml +++ b/tasks/packagemgmt.yml @@ -26,7 +26,10 @@ ansible.builtin.apt: upgrade: safe register: apt_upgrade_response - changed_when: apt_upgrade_response.stdout.find('0 upgraded') == -1 - system_upgrade | bool + changed_when: + - apt_upgrade_response.stdout.find('0 upgraded') == -1 + when: + - system_upgrade | bool notify: - Run apt-get clean - Run apt-get autoremove