From 904f5be944ca22619a616a5132879e3a3ca79d89 Mon Sep 17 00:00:00 2001 From: Nathan Douglas Date: Wed, 6 Mar 2024 06:25:22 -0500 Subject: [PATCH] Update apt cache when Kubernetes repo is added. --- tasks/setup-Debian.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index c74bc2e..c2aa395 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -14,6 +14,12 @@ uris: "{{ kubernetes_apt_repository }}" suites: / signed_by: "{{ kubernetes_apt_repository }}/Release.key" + register: kubernetes_repository + +- name: 'Update Apt cache.' + ansible.builtin.apt: + update_cache: true + when: kubernetes_repository.changed - name: Add Kubernetes apt preferences file to pin a version. template: