Merge pull request #6991 from joshuaconner/bugfix_dont_send_wrong_params_to_dockerclient_start

Docker: don't send wrong parameters to client.start()
This commit is contained in:
James Cammarata 2014-04-23 15:48:04 -05:00
commit f068a4f26a

View file

@ -570,8 +570,7 @@ class DockerManager:
'privileged': self.module.params.get('privileged'),
'links': self.links,
}
if docker.utils.compare_version('1.10', self.client.version()['ApiVersion']) >= 0:
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')