From 3b40e38b85fce5f11ea8bce4fbe81641c93d9c81 Mon Sep 17 00:00:00 2001 From: Julien Girardin Date: Mon, 27 Nov 2023 14:38:48 +0100 Subject: [PATCH] Fix dry-run with setting repository key wuthout apt-key, and weekly job --- roles/packages/tasks/kube_repo_Debian.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/packages/tasks/kube_repo_Debian.yml b/roles/packages/tasks/kube_repo_Debian.yml index b7fd1ad..e90868a 100644 --- a/roles/packages/tasks/kube_repo_Debian.yml +++ b/roles/packages/tasks/kube_repo_Debian.yml @@ -3,12 +3,14 @@ file: dest: /etc/apt/keyrings state: directory + register: _apt_keyring_directory - name: 'Add kubernetes repo signing key' ansible.builtin.get_url: url: '{{ kubernetes_repository.gpg_url }}' dest: '/etc/apt/keyrings/kubernetes-apt-keyring.asc' force: true + when: not(_apt_keyring_directory is changed and ansible_check_mode) - name: 'Add the kubernetes repository' apt_repository: