mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-17 20:38:42 +00:00
(cherry picked from commit ec14568b22)
This commit is contained in:
parent
24b8b82545
commit
c3eaabc148
2
changelogs/fragments/1187-docker.yml
Normal file
2
changelogs/fragments/1187-docker.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- "Docker CLI based modules - work around bug in Docker 29.0.0 that caused a breaking change in ``docker version --format json`` output (https://github.com/ansible-collections/community.docker/issues/1185, https://github.com/ansible-collections/community.docker/pull/1187)."
|
||||||
@ -86,9 +86,10 @@ class AnsibleDockerClientBase(object):
|
|||||||
self._info = None
|
self._info = None
|
||||||
|
|
||||||
if needs_api_version:
|
if needs_api_version:
|
||||||
if not isinstance(self._version.get('Server'), dict) or not isinstance(self._version['Server'].get('ApiVersion'), string_types):
|
api_version_string = self._version["Server"].get("ApiVersion") or self._version["Server"].get("APIVersion")
|
||||||
|
if not isinstance(self._version.get('Server'), dict) or not isinstance(api_version_string, string_types):
|
||||||
self.fail('Cannot determine Docker Daemon information. Are you maybe using podman instead of docker?')
|
self.fail('Cannot determine Docker Daemon information. Are you maybe using podman instead of docker?')
|
||||||
self.docker_api_version_str = to_native(self._version['Server']['ApiVersion'])
|
self.docker_api_version_str = to_native(api_version_string)
|
||||||
self.docker_api_version = LooseVersion(self.docker_api_version_str)
|
self.docker_api_version = LooseVersion(self.docker_api_version_str)
|
||||||
min_docker_api_version = min_docker_api_version or '1.25'
|
min_docker_api_version = min_docker_api_version or '1.25'
|
||||||
if self.docker_api_version < LooseVersion(min_docker_api_version):
|
if self.docker_api_version < LooseVersion(min_docker_api_version):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user