feat: update apt upgrade tasks to conditionally refresh cache based on apt_update variable

This commit is contained in:
2026-08-07 11:43:28 +02:00
parent 6ba7c61cb7
commit c4acc32add
8 changed files with 14 additions and 7 deletions
@@ -56,7 +56,7 @@
- name: Upgrade packages
ansible.builtin.apt:
upgrade: "{{ apt_upgrade_type | default('safe') }}"
update_cache: true
update_cache: "{{ not (apt_update | default(true) | bool) }}"
dpkg_options: "{{ (apt_upgrade_dpkg_options | default(['force-confdef','force-confold'])) | join(',') }}"
when: (apt_upgrade | default(false)) | bool
tags: [ansible-dependencies]