docker: send 1.10 params if docker-py is new enough version
This commit is contained in:
parent
0ef288dcc8
commit
10171dc42b
1 changed files with 3 additions and 0 deletions
|
@ -565,6 +565,9 @@ class DockerManager:
|
||||||
'privileged': self.module.params.get('privileged'),
|
'privileged': self.module.params.get('privileged'),
|
||||||
'links': self.links,
|
'links': self.links,
|
||||||
}
|
}
|
||||||
|
if docker.utils.compare_version('1.10', self.client.version()['ApiVersion']) >= 0 and hasattr(docker, '__version__') and docker.__version__ > '0.3.0':
|
||||||
|
params['dns'] = self.module.params.get('dns')
|
||||||
|
params['volumes_from'] = self.module.params.get('volumes_from')
|
||||||
|
|
||||||
for i in containers:
|
for i in containers:
|
||||||
self.client.start(i['Id'], **params)
|
self.client.start(i['Id'], **params)
|
||||||
|
|
Loading…
Reference in a new issue