Files
cloud-docker/tasks/main.yml
T
lhahnandClaude Opus 5.5 ebe85e2989 Use distro release and Debian arch for the Docker apt repo
The repo line was hard-coded to bookworm/arm64 as a workaround before Docker published trixie packages. Derive it from ansible_distribution_release and map ansible_architecture to the Debian architecture name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:23:00 +02:00

52 lines
1.4 KiB
YAML
Executable File

---
# Basics
- name: install requirements for docker
apt:
update_cache: yes
state: "{% if cloud_update | bool %}latest{% else %}present{% endif %}"
install_recommends: yes
pkg:
- apt-transport-https
- ca-certificates
- gnupg2
- curl
# Docker
- name: Create apt keyrings directory
file:
path: /etc/apt/keyrings
state: directory
mode: '0755'
- name: Download Docker GPG key
get_url:
url: https://download.docker.com/linux/debian/gpg
dest: /etc/apt/keyrings/docker.asc
mode: '0644'
- name: Add Docker repository
apt_repository:
repo: "deb [arch={{ docker_apt_arch[ansible_architecture] | default(ansible_architecture) }} signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
state: present
filename: docker
- name: Update apt cache
apt:
update_cache: yes
- name: install docker (docker-ce + docker-ce-cli)
apt:
update_cache: yes
state: "{% if cloud_update | bool %}latest{% else %}present{% endif %}"
install_recommends: yes
pkg:
- docker-ce
- docker-ce-cli
- python3-docker
# Docker Compose
- name: download latest docker
get_url:
url: "https://github.com/docker/compose/releases/download/v{{ docker_compose_version }}/docker-compose-linux-{{ ansible_architecture }}"
dest: /usr/local/bin/docker-compose
mode: 0755