From c785e788ca98e612d7f4c642834a97f8158cffd9 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 12 Feb 2024 16:30:55 +0100 Subject: [PATCH] Update the apt cache when the repo changes. --- tasks/timescale_db_deb.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/timescale_db_deb.yml b/tasks/timescale_db_deb.yml index 587f6c2..ac2f54c 100644 --- a/tasks/timescale_db_deb.yml +++ b/tasks/timescale_db_deb.yml @@ -21,7 +21,12 @@ signed_by: "{{ timescale_db_repo_key }}" state: present enabled: true + register: timescaledb_repo when: ansible_distribution == "Ubuntu" + - name: timescale_db_deb | Update the apt cache + ansible.builtin.apt: + update_cache: yes + when: timescaledb_repo is changed - name: timescale_db_deb | Install the timescale DB package on deb ansible.builtin.apt: pkg: '{{ timescale_db_deb_pkgs }}'