diff --git a/roles/kubernetes/tasks/Ubuntu.yml b/roles/kubernetes/tasks/Ubuntu.yml index 59ead9b..b17114e 100644 --- a/roles/kubernetes/tasks/Ubuntu.yml +++ b/roles/kubernetes/tasks/Ubuntu.yml @@ -86,16 +86,20 @@ - name: Download Docker GPG key shell: | - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \ + curl -fsSL https://download.docker.com/linux/debian/gpg | \ sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg - - name: Add Docker repository (Ubuntu 24 safe) - apt_repository: - repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] \ - https://download.docker.com/linux/ubuntu noble stable" - state: present - filename: docker - update_cache: no + - name: Add Docker repository source file + ansible.builtin.copy: + dest: /etc/apt/sources.list.d/docker.sources + mode: '0644' + content: | + Types: deb + URIs: https://download.docker.com/linux/debian + Suites: {{ ansible_distribution_release }} + Components: stable + Architectures: {{ 'amd64' if ansible_architecture == 'x86_64' else ansible_architecture }} + Signed-By: /etc/apt/keyrings/docker.asc - name: Update apt cache apt: