mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Fix compose_version error. Check has compose before checking version.
This commit is contained in:
@@ -484,14 +484,14 @@ class ContainerManager(DockerBaseClass):
|
|||||||
if self.files:
|
if self.files:
|
||||||
self.options[u'--file'] = self.files
|
self.options[u'--file'] = self.files
|
||||||
|
|
||||||
|
if not HAS_COMPOSE:
|
||||||
|
self.client.fail("Unable to load docker-compose. Try `pip install docker-compose`. Error: %s" % HAS_COMPOSE_EXC)
|
||||||
|
|
||||||
if LooseVersion(compose_version) < LooseVersion(MINIMUM_COMPOSE_VERSION):
|
if LooseVersion(compose_version) < LooseVersion(MINIMUM_COMPOSE_VERSION):
|
||||||
self.client.fail("Found docker-compose version %s. Minimum required version is %s. "
|
self.client.fail("Found docker-compose version %s. Minimum required version is %s. "
|
||||||
"Upgrade docker-compose to a min version of %s." %
|
"Upgrade docker-compose to a min version of %s." %
|
||||||
(compose_version, MINIMUM_COMPOSE_VERSION, MINIMUM_COMPOSE_VERSION))
|
(compose_version, MINIMUM_COMPOSE_VERSION, MINIMUM_COMPOSE_VERSION))
|
||||||
|
|
||||||
if not HAS_COMPOSE:
|
|
||||||
self.client.fail("Unable to load docker-compose. Try `pip install docker-compose`. Error: %s" % HAS_COMPOSE_EXC)
|
|
||||||
|
|
||||||
self.log("options: ")
|
self.log("options: ")
|
||||||
self.log(self.options, pretty_print=True)
|
self.log(self.options, pretty_print=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user