From 38fc33ce709d8e0648e4189910e349e97f1e6026 Mon Sep 17 00:00:00 2001 From: julian Date: Sun, 30 Jul 2023 01:18:27 +0200 Subject: [PATCH] Don't use apt-key anymore, since it's deprecated --- playbooks/roles/nginx/tasks/main/repo_setup.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/playbooks/roles/nginx/tasks/main/repo_setup.yaml b/playbooks/roles/nginx/tasks/main/repo_setup.yaml index 7d9c053..4026f28 100644 --- a/playbooks/roles/nginx/tasks/main/repo_setup.yaml +++ b/playbooks/roles/nginx/tasks/main/repo_setup.yaml @@ -6,22 +6,25 @@ become: true - name: make sure NGINX signing key is added - ansible.builtin.apt_key: + ansible.builtin.get_url: url: https://nginx.org/keys/nginx_signing.key - state: present + dest: /etc/apt/trusted.gpg.d/nginx.asc + mode: "0644" + owner: root + group: root become: true notify: apt-get update - name: make sure NGINX APT repository is added ansible.builtin.apt_repository: - repo: "deb https://nginx.org/packages/debian/ {{ ansible_distribution_release }} nginx" + repo: "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/nginx.asc] https://nginx.org/packages/debian/ {{ ansible_distribution_release }} nginx" state: present become: true notify: apt-get update - name: make sure NGINX APT source repository is added ansible.builtin.apt_repository: - repo: "deb-src https://nginx.org/packages/debian/ {{ ansible_distribution_release }} nginx" + repo: "deb-src [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/nginx.asc] https://nginx.org/packages/debian/ {{ ansible_distribution_release }} nginx" state: present become: true notify: apt-get update