diff --git a/README.md b/README.md index e679eb45..9e99e489 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ docker_restart_handler_state: restarted Variables to control the state of the `docker` service, and whether it should start on boot. If you're installing Docker inside a Docker container without systemd or sysvinit, you should set `docker_service_manage` to `false`. ```yaml -docker_install_compose_plugin: false +docker_install_compose_plugin: true docker_compose_package: docker-compose-plugin docker_compose_package_state: present ``` @@ -59,9 +59,10 @@ docker_compose_package_state: present Docker Compose Plugin installation options. These differ from the below in that docker-compose is installed as a docker plugin (and used with `docker compose`) instead of a standalone binary. ```yaml -docker_install_compose: true -docker_compose_version: "1.26.0" +docker_install_compose: false +docker_compose_version: "2.29.2" docker_compose_arch: "{{ ansible_architecture }}" +docker_compose_url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-linux-{{ docker_compose_arch }}" docker_compose_path: /usr/local/bin/docker-compose ``` diff --git a/defaults/main.yml b/defaults/main.yml index 7449b5bd..6cbf9437 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -29,7 +29,7 @@ docker_compose_package_state: present # Docker Compose options. docker_install_compose: false -docker_compose_version: "v2.11.1" +docker_compose_version: "v2.29.2" docker_compose_arch: "{{ ansible_architecture }}" docker_compose_url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-linux-{{ docker_compose_arch }}" docker_compose_path: /usr/local/bin/docker-compose diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index a864b3f0..53ee5e55 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -1,4 +1,17 @@ --- +- name: Ensure apt key is not present in trusted.gpg.d + ansible.builtin.file: + path: /etc/apt/trusted.gpg.d/docker.asc + state: absent + +- name: Ensure the repo referencing the previous trusted.gpg.d key is not present + apt_repository: + repo: "deb [arch={{ docker_apt_arch }} signed-by=/etc/apt/trusted.gpg.d/docker.asc] {{ docker_repo_url }}/{{ docker_apt_ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" + state: absent + filename: "{{ docker_apt_filename }}" + update_cache: true + when: docker_add_repo | bool + - # See https://docs.docker.com/engine/install/debian/#uninstall-old-versions name: Ensure old versions of Docker are not installed. package: