diff --git a/roles/common/tasks/redis-server.yml b/roles/common/tasks/redis-server.yml index 9e3b095..f64938c 100644 --- a/roles/common/tasks/redis-server.yml +++ b/roles/common/tasks/redis-server.yml @@ -8,22 +8,6 @@ else '/etc/redis/redis.conf' }} -- name: (redis-server.yml) update - ansible.builtin.apt: - update_cache: true - cache_valid_time: >- - {{ - 0 - 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 - tags: - - redis-server - - name: >- (redis-server.yml) Configure any half-installed packages 'dpkg --configure -a' @@ -37,10 +21,21 @@ tags: - redis-server +- name: (redis-server.yml) update + ansible.builtin.command: apt-get update # noqa: command-instead-of-module + changed_when: false + environment: + DEBIAN_FRONTEND: noninteractive + when: + - ansible_facts['distribution'] == "Debian" + - apt_update|bool + tags: + - redis-server + - name: (redis-server.yml) upgrade ansible.builtin.apt: upgrade: "{{ apt_upgrade_type }}" - # apt cache is refreshed in the preceding "update" task + # apt cache refresh happens in the preceding redis update task update_cache: false dpkg_options: "{{ apt_upgrade_dpkg_options | join(',') }}" when: