fix: remove docker-compose-v2 before installing docker-compose-plugin

copenhagen-a had Ubuntu's docker-compose-v2 package installed, which
conflicts with Docker's official docker-compose-plugin over
/usr/libexec/docker/cli-plugins/docker-compose.

Moved the removal task before the install task and added docker-compose-v2
to the removal list.
This commit is contained in:
Rasmus Wejlgaard 2026-03-30 18:08:50 +00:00
parent b16f89357b
commit cfb2e83070

View file

@ -53,6 +53,15 @@
update_cache: true
when: ansible_facts["os_family"] == "Debian"
- name: Remove old docker packages (Debian/Ubuntu)
ansible.builtin.apt:
name:
- docker.io
- docker-compose
- docker-compose-v2
state: absent
when: ansible_facts["os_family"] == "Debian"
- name: Install Docker (Debian/Ubuntu)
ansible.builtin.apt:
name:
@ -63,14 +72,6 @@
state: present
when: ansible_facts["os_family"] == "Debian"
- name: Remove old docker packages (Debian/Ubuntu)
ansible.builtin.apt:
name:
- docker.io
- docker-compose
state: absent
when: ansible_facts["os_family"] == "Debian"
- name: Install Docker (Alpine)
community.general.apk:
name: