Skip to content

Commit

Permalink
Add docker_compose_v2 module (#739)
Browse files Browse the repository at this point in the history
* Add docker_compose_v2 module.

* Add note on compatibility.

* Parse more events.

Emit warnings (or things we assume are warnings), and report unparsable
messages to the user so they can report them to us.
  • Loading branch information
felixfontein authored Jan 3, 2024
1 parent 762ce3e commit b774837
Show file tree
Hide file tree
Showing 26 changed files with 1,264 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ 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
- community.docker.docker_compose: manage Docker Compose files (legacy Docker Compose v1)
- community.docker.docker_compose_v2: manage Docker Compose files (Docker compose CLI plugin)
* Docker Swarm:
- community.docker.docker_config: manage configurations
- community.docker.docker_node: manage Docker Swarm nodes
Expand Down
1 change: 1 addition & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ requires_ansible: '>=2.11.0'
action_groups:
docker:
- docker_compose
- docker_compose_v2
- docker_config
- docker_container
- docker_container_copy_into
Expand Down
6 changes: 5 additions & 1 deletion plugins/modules/docker_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
module: docker_compose
short_description: Manage multi-container Docker applications with Docker Compose.
short_description: Manage multi-container Docker applications with Docker Compose V1
author: "Chris Houseknecht (@chouseknecht)"
description:
- Uses Docker Compose to start, shutdown and scale services. B(This module requires docker-compose < 2.0.0.)
Use the M(community.docker.docker_compose_v2) module for using the modern Docker compose CLI plugin.
- Configuration can be read from a C(docker-compose.yml) or C(docker-compose.yaml) file or inline using the O(definition) option.
- See the examples for more details.
- Supports check mode.
Expand Down Expand Up @@ -188,6 +189,9 @@
- "docker-compose >= 1.7.0, < 2.0.0"
- "Docker API >= 1.25"
- "PyYAML >= 3.11"
seealso:
- module: community.docker.docker_compose_v2
'''

EXAMPLES = '''
Expand Down
Loading

0 comments on commit b774837

Please sign in to comment.