From 38d2d5cc46ce51a4dfd0cfd00884665f0d738389 Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Sun, 5 Feb 2023 17:47:36 +0100 Subject: [PATCH] fix apt key handling --- roles/common/tasks/debian.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/roles/common/tasks/debian.yml b/roles/common/tasks/debian.yml index b3cf406..0db0b44 100644 --- a/roles/common/tasks/debian.yml +++ b/roles/common/tasks/debian.yml @@ -1,10 +1,11 @@ --- - name: Add Hashicorp GPG key - apt_key: + ansible.builtin.get_url: url: https://apt.releases.hashicorp.com/gpg - state: present + dest: /etc/apt/trusted.gpg.d/hashicorp-archive-keyring.asc - name: Add Hashicorp apt repository - apt_repository: - repo: deb [arch=amd64] {{ hashi_common__apt_repo }} {{ ansible_distribution_release }} main + ansible.builtin.apt_repository: + filename: hashicorp + repo: deb [signed-by=/etc/apt/trusted.gpg.d/hashicorp-archive-keyring.asc] {{ hashi_common__apt_repo }} {{ ansible_distribution_release }} main state: present