fix(docker_compose_v2): fix version check (#1059)

* fix version check

* add changelog fragment
This commit is contained in:
londondaintta 2025-03-17 19:20:21 +00:00 committed by GitHub
parent 9730b2a3c3
commit c13b891bc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
bugfixes:
- docker_compose_v2 - fix version check for ``assume_yes`` (https://github.com/ansible-collections/community.docker/pull/1054).

View File

@ -477,7 +477,7 @@ class ServicesManager(BaseComposeManager):
self.wait = parameters['wait']
self.wait_timeout = parameters['wait_timeout']
self.yes = parameters['assume_yes']
if self.compose_version >= LooseVersion('2.32.0') and self.yes:
if self.compose_version < LooseVersion('2.32.0') and self.yes:
self.fail('assume_yes=true needs Docker Compose 2.32.0 or newer, not version %s' % (self.compose_version, ))
for key, value in self.scale.items():