From 5af310e55a7639f8127b5853ed2b96021831edcf Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 31 Jul 2026 13:09:11 +0200 Subject: [PATCH] fix: set changed_when to false for apt update command. --- roles/common/tasks/apt.yml | 1 + roles/common/tasks/caching-nameserver.yml | 1 + roles/common/tasks/redis-server.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/roles/common/tasks/apt.yml b/roles/common/tasks/apt.yml index f5f0ea8..77d9b77 100644 --- a/roles/common/tasks/apt.yml +++ b/roles/common/tasks/apt.yml @@ -169,6 +169,7 @@ ansible.builtin.apt: update_cache: true cache_valid_time: "{{ 0 if common_apt_config_updated is defined and common_apt_config_updated.changed else apt_update_cache_valid_time }}" + changed_when: false when: apt_update|bool tags: - apt-update diff --git a/roles/common/tasks/caching-nameserver.yml b/roles/common/tasks/caching-nameserver.yml index 5488dfe..6a260b6 100644 --- a/roles/common/tasks/caching-nameserver.yml +++ b/roles/common/tasks/caching-nameserver.yml @@ -7,6 +7,7 @@ ansible.builtin.apt: update_cache: true cache_valid_time: "{{ 0 if common_apt_config_updated is defined and common_apt_config_updated.changed else apt_update_cache_valid_time }}" + changed_when: false when: - ansible_facts["distribution"] == "Debian" - apt_update|bool diff --git a/roles/common/tasks/redis-server.yml b/roles/common/tasks/redis-server.yml index 0cd775c..7e503a6 100644 --- a/roles/common/tasks/redis-server.yml +++ b/roles/common/tasks/redis-server.yml @@ -17,6 +17,7 @@ if apt_config_updated is defined and apt_config_updated.changed else apt_update_cache_valid_time }} + changed_when: false when: - ansible_facts['distribution'] == "Debian" - apt_update|bool