This commit is contained in:
2026-02-23 21:47:35 +01:00
parent 0eb5c15d2b
commit 6fa22fc99f

View File

@@ -54,16 +54,32 @@
- software-properties-common - software-properties-common
state: present state: present
- name: Add Docker GPG key for containerd - name: Remove old Docker repository files (if any)
ansible.builtin.apt_key: file:
url: https://download.docker.com/linux/ubuntu/gpg path: "{{ item }}"
keyring: /etc/apt/trusted.gpg.d/containerd.gpg state: absent
state: present loop:
- /etc/apt/sources.list.d/docker.list
- /etc/apt/keyrings/docker.gpg
- /etc/apt/trusted.gpg.d/containerd.gpg
- name: Add Docker repository - name: Create keyrings directory
ansible.builtin.apt_repository: file:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable" path: /etc/apt/keyrings
state: directory
mode: '0755'
- name: Download Docker GPG key
get_url:
url: https://download.docker.com/linux/ubuntu/gpg
dest: /etc/apt/keyrings/docker.gpg
mode: '0644'
- name: Add Docker repository (Ubuntu 24.04 safe)
apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename }} stable"
state: present state: present
filename: docker
- name: Install required packages - name: Install required packages