mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-18 21:02:36 +00:00
* Restrict API version to 1.44 if default API version is 1.45+.
* Set COMPOSE_API_VERSION if api_version is provided.
* Add changelog.
(cherry picked from commit 691bc6de72)
This commit is contained in:
parent
af558d2ef5
commit
d0aee07ab0
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- "docker_compose - make sure that the module uses the ``api_version`` parameter (https://github.com/ansible-collections/community.docker/pull/881)."
|
||||
@ -659,6 +659,9 @@ class ContainerManager(DockerBaseClass):
|
||||
for key, value in client.module.params.items():
|
||||
setattr(self, key, value)
|
||||
|
||||
if self.api_version:
|
||||
os.environ['COMPOSE_API_VERSION'] = self.api_version
|
||||
|
||||
self.check_mode = client.check_mode
|
||||
|
||||
if not self.debug:
|
||||
|
||||
@ -15,7 +15,11 @@
|
||||
msg: "Using container name prefix {{ cname_prefix }}"
|
||||
|
||||
# Run the tests
|
||||
- block:
|
||||
- module_defaults:
|
||||
community.docker.docker_compose:
|
||||
api_version: '{{ omit if docker_api_version is version("1.45", "<") else "1.44" }}'
|
||||
|
||||
block:
|
||||
- include_tasks: run-test.yml
|
||||
with_fileglob:
|
||||
- "tests/*.yml"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user