From 2a803c611b77c04a81377331004616d0daa8fb9f Mon Sep 17 00:00:00 2001 From: Emil Simeonov Date: Sat, 20 Jun 2026 21:23:54 +0200 Subject: [PATCH] fix: add Docker APT repository before installing docker-ce The rootless_docker.yml task was trying to apt install docker-ce without first adding the Docker APT repository, causing package not found errors on Debian/Ubuntu containers. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../gitea-runner/tasks/rootless_docker.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ansible/roles/gitea-runner/tasks/rootless_docker.yml b/ansible/roles/gitea-runner/tasks/rootless_docker.yml index 4057cfb..7a3f11b 100644 --- a/ansible/roles/gitea-runner/tasks/rootless_docker.yml +++ b/ansible/roles/gitea-runner/tasks/rootless_docker.yml @@ -1,4 +1,21 @@ --- +- name: Install Docker GPG key (Debian/Ubuntu) + ansible.builtin.get_url: + url: "https://download.docker.com/linux/{{ ansible_facts['distribution'] | lower }}/gpg" + dest: "{{ docker_gpg_key_path }}" + mode: "0644" + when: ansible_facts['os_family'] == 'Debian' + +- name: Add Docker APT repository (Debian/Ubuntu) + ansible.builtin.apt_repository: + repo: >- + deb [arch={{ ansible_facts['architecture'] }} signed-by={{ docker_gpg_key_path }}] + https://download.docker.com/linux/{{ ansible_facts['distribution'] | lower }} + {{ ansible_facts['distribution_release'] }} stable + state: present + update_cache: true + when: ansible_facts['os_family'] == 'Debian' + - name: Install rootless Docker dependencies (Debian/Ubuntu) ansible.builtin.apt: name: