Change apt update task to use command module and set DEBIAN_FRONTEND to noninteractive

This commit is contained in:
2026-08-08 08:57:01 +02:00
parent 762d249f82
commit 06fb080d5c
+3 -3
View File
@@ -157,10 +157,10 @@
- apt-configuration
- name: (apt.yml) apt update
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 }}"
ansible.builtin.command: apt-get update # noqa: command-instead-of-module
changed_when: false
environment:
DEBIAN_FRONTEND: noninteractive
when: apt_update|bool
tags:
- apt-update