mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-17 04:18:42 +00:00
Docker Compose v1 tests: restrict API version to 1.44 if default API version is 1.45+ (#881)
* Restrict API version to 1.44 if default API version is 1.45+. * Set COMPOSE_API_VERSION if api_version is provided. * Add changelog.
This commit is contained in:
parent
fd5110c94c
commit
691bc6de72
@ -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)."
|
||||||
@ -675,6 +675,9 @@ class ContainerManager(DockerBaseClass):
|
|||||||
for key, value in client.module.params.items():
|
for key, value in client.module.params.items():
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
||||||
|
if self.api_version:
|
||||||
|
os.environ['COMPOSE_API_VERSION'] = self.api_version
|
||||||
|
|
||||||
self.check_mode = client.check_mode
|
self.check_mode = client.check_mode
|
||||||
|
|
||||||
if not self.debug:
|
if not self.debug:
|
||||||
|
|||||||
@ -19,7 +19,11 @@
|
|||||||
msg: "Using container name prefix {{ cname_prefix }}"
|
msg: "Using container name prefix {{ cname_prefix }}"
|
||||||
|
|
||||||
# Run the tests
|
# 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
|
- include_tasks: run-test.yml
|
||||||
with_fileglob:
|
with_fileglob:
|
||||||
- "tests/*.yml"
|
- "tests/*.yml"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user