From 869bad82603cc4f1477107e920e556b5ca74c209 Mon Sep 17 00:00:00 2001 From: Brian Lee Date: Mon, 29 May 2023 09:15:02 -0700 Subject: [PATCH] Fix: Refresh apt cache to get the package details before trying to install it. --- tasks/Debian.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/Debian.yml b/tasks/Debian.yml index 47e88be..afa7846 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -12,8 +12,14 @@ path: /etc/apt/sources.list.d/ntfy.list line: deb [arch=amd64 signed-by=/usr/share/keyrings/archive.heckel.io.asc] https://archive.heckel.io/apt debian main create: true + register: ntfy_repo + +- name: Update the apt repository cache + ansible.builtin.apt: + update_cache: yes + when: ntfy_repo.changed - name: Install the ntfy package ansible.builtin.apt: name: ntfy - state: present + state: latest