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>
This commit is contained in:
Emil Simeonov
2026-06-20 21:23:54 +02:00
co-authored by Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 43b2a01361
commit 2a803c611b
@@ -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: