chore: migrate to apt keyring for validation/signing

This commit is contained in:
Bert-Jan Fikse 2025-12-18 11:28:14 +01:00
parent 172665d237
commit 188a6f539f
Signed by: bert-jan
GPG key ID: C1E0AB516AC16D1A

View file

@ -31,15 +31,23 @@
state: present
when: ansible_os_family == "Debian"
- name: Create keyrings directory
ansible.builtin.file:
path: /etc/apt/keyrings
state: directory
mode: '0755'
when: ansible_os_family == "Debian"
- name: Add Docker GPG key
ansible.builtin.apt_key:
ansible.builtin.get_url:
url: https://download.docker.com/linux/debian/gpg
state: present
dest: /etc/apt/keyrings/docker.asc
mode: '0644'
when: ansible_os_family == "Debian"
- name: Add Docker repository
ansible.builtin.apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
state: present
when: ansible_os_family == "Debian"