Update the apt cache when the repo changes.

This commit is contained in:
Andrea Dell'Amico 2024-02-12 16:30:55 +01:00
parent 26322bc16c
commit c785e788ca
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 5 additions and 0 deletions

View File

@ -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 }}'