mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Docker modules: improve documentation on docker vs. docker-py Python package requirements (#42457)
* Make sure all docker-py/docker requirements are listed, and clarify about docker vs. docker-py. * Adjusting changes made in #40839.
This commit is contained in:
parent
27f540ac5c
commit
765a5130d5
10 changed files with 66 additions and 13 deletions
|
@ -167,14 +167,15 @@ class AnsibleDockerClient(Client):
|
|||
|
||||
if HAS_DOCKER_MODELS and HAS_DOCKER_SSLADAPTER:
|
||||
self.fail("Cannot have both the docker-py and docker python modules installed together as they use the same namespace and "
|
||||
"cause a corrupt installation. Please uninstall both packages, and re-install only the docker-py or docker python module")
|
||||
"cause a corrupt installation. Please uninstall both packages, and re-install only the docker-py or docker python "
|
||||
"module. It is recommended to install the docker module if no support for Python 2.6 is required.")
|
||||
|
||||
if not HAS_DOCKER_PY:
|
||||
self.fail("Failed to import docker-py - %s. Try `pip install docker-py`" % HAS_DOCKER_ERROR)
|
||||
self.fail("Failed to import docker or docker-py - %s. Try `pip install docker` or `pip install docker-py` (Python 2.6)" % HAS_DOCKER_ERROR)
|
||||
|
||||
if LooseVersion(docker_version) < LooseVersion(MIN_DOCKER_VERSION):
|
||||
self.fail("Error: docker-py version is %s. Minimum version required is %s." % (docker_version,
|
||||
MIN_DOCKER_VERSION))
|
||||
self.fail("Error: docker / docker-py version is %s. Minimum version required is %s." % (docker_version,
|
||||
MIN_DOCKER_VERSION))
|
||||
|
||||
self.debug = self.module.params.get('debug')
|
||||
self.check_mode = self.module.check_mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue