From 1c0bca3052b73a1712c61990402562a5e0626f08 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 7 Apr 2024 22:27:17 +0200 Subject: [PATCH] Deprecate Docker Compose v1. --- README.md | 2 +- changelogs/fragments/deprecate-compose-v1.yml | 4 ++++ docs/docsite/rst/scenario_guide.rst | 7 ++++--- meta/runtime.yml | 7 +++++++ plugins/modules/docker_compose.py | 5 +++++ 5 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/deprecate-compose-v1.yml diff --git a/README.md b/README.md index 0d169c54a..de168d3bd 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ If you use the Ansible package and do not update collections independently, use - community.docker.docker_volume: manage Docker volumes - community.docker.docker_volume_info: retrieve information on Docker volumes * Docker Compose: - - community.docker.docker_compose: manage Docker Compose files (legacy Docker Compose v1) + - community.docker.docker_compose: manage Docker Compose files (legacy Docker Compose v1; the module is deprecated and will be removed from community.docker 4.0.0) - community.docker.docker_compose_v2: manage Docker Compose files (Docker compose CLI plugin) - community.docker.docker_compose_v2_pull: pull a Docker compose project * Docker Swarm: diff --git a/changelogs/fragments/deprecate-compose-v1.yml b/changelogs/fragments/deprecate-compose-v1.yml new file mode 100644 index 000000000..30f010491 --- /dev/null +++ b/changelogs/fragments/deprecate-compose-v1.yml @@ -0,0 +1,4 @@ +deprecated_features: + - "docker_compose - the Docker Compose v1 module is deprecated and will be removed from community.docker 4.0.0. + Please migrate to the ``community.docker.docker_compose_v2`` module, which works with Docker Compose v2 + (https://github.com/ansible-collections/community.docker/issues/823, https://github.com/ansible-collections/community.docker/pull/833)." diff --git a/docs/docsite/rst/scenario_guide.rst b/docs/docsite/rst/scenario_guide.rst index 203aa57d2..395b71003 100644 --- a/docs/docsite/rst/scenario_guide.rst +++ b/docs/docsite/rst/scenario_guide.rst @@ -272,12 +272,13 @@ No further requirements next to to the CLI tool and its Docker Compose plugin ar Docker Compose v1 ................. -The :ansplugin:`community.docker.docker_compose module ` +The deprecated :ansplugin:`community.docker.docker_compose module ` allows you to use your existing Docker compose files to orchestrate containers on a single Docker daemon or on Swarm. This module uses the out-dated and End of Life version 1.x of Docker Compose. It should mainly be used for legacy systems -which still have to use that version of Docker Compose. +which still have to use that version of Docker Compose. **The module is deprecated and will be removed from community.docker 4.0.0.** +Please use the Docker Compose v2 modules instead. -You need to install the `old Python docker-compose `_ on the remote machines to use the module. +You need to install the `old Python docker-compose `_ on the remote machines to use the Docker Compose v1 module. Docker Machine diff --git a/meta/runtime.yml b/meta/runtime.yml index 0ddd09fa3..e29f84be1 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -41,3 +41,10 @@ action_groups: - docker_swarm_service_info - docker_volume - docker_volume_info + +plugin_routing: + modules: + docker_compose: + deprecation: + removal_version: 4.0.0 + warning_text: This module uses docker-compose v1, which is End of Life since July 2022. Please migrate to community.docker.docker_compose_v2. diff --git a/plugins/modules/docker_compose.py b/plugins/modules/docker_compose.py index f8edbee4b..3af3bebb1 100644 --- a/plugins/modules/docker_compose.py +++ b/plugins/modules/docker_compose.py @@ -14,6 +14,11 @@ short_description: Manage multi-container Docker applications with Docker Compose V1 +deprecated: + removed_in: 4.0.0 + why: This module uses docker-compose v1, which is End of Life since July 2022. + alternative: Migrate to M(community.docker.docker_compose_v2) + author: "Chris Houseknecht (@chouseknecht)" description: