moved defaulting to module constant to after when it is defined
This commit is contained in:
parent
0e7e9aae91
commit
d66c3fcf51
1 changed files with 3 additions and 1 deletions
|
@ -524,6 +524,8 @@ class DockerManager(object):
|
|||
# connect to docker server
|
||||
docker_url = urlparse(module.params.get('docker_url'))
|
||||
docker_api_version = module.params.get('docker_api_version')
|
||||
if not docker_api_version:
|
||||
docker_api_version=docker.client.DEFAULT_DOCKER_API_VERSION
|
||||
self.client = docker.Client(base_url=docker_url.geturl(), version=docker_api_version)
|
||||
|
||||
self.docker_py_versioninfo = get_docker_py_versioninfo()
|
||||
|
@ -845,7 +847,7 @@ def main():
|
|||
memory_limit = dict(default=0),
|
||||
memory_swap = dict(default=0),
|
||||
docker_url = dict(default='unix://var/run/docker.sock'),
|
||||
docker_api_version = dict(default=docker.client.DEFAULT_DOCKER_API_VERSION),
|
||||
docker_api_version = dict(),
|
||||
username = dict(default=None),
|
||||
password = dict(),
|
||||
email = dict(),
|
||||
|
|
Loading…
Reference in a new issue