|
|
@ -717,7 +717,7 @@ class DockerManager(object):
|
|
|
|
self.module.fail_json(msg='invalid bind mode ' + parts[2])
|
|
|
|
self.module.fail_json(msg='invalid bind mode ' + parts[2])
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
mode = parts[2]
|
|
|
|
mode = parts[2]
|
|
|
|
self.binds.append((parts[0], {'bind': parts[1], 'mode': mode}))
|
|
|
|
self.binds.append("%s:%s:%s" % (parts[0], parts[1], mode))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
self.module.fail_json(msg='volumes support 1 to 3 arguments')
|
|
|
|
self.module.fail_json(msg='volumes support 1 to 3 arguments')
|
|
|
|
|
|
|
|
|
|
|
@ -1370,14 +1370,8 @@ class DockerManager(object):
|
|
|
|
|
|
|
|
|
|
|
|
expected_binds = set()
|
|
|
|
expected_binds = set()
|
|
|
|
if self.binds:
|
|
|
|
if self.binds:
|
|
|
|
for host_path, config in self.binds:
|
|
|
|
for bind in self.binds:
|
|
|
|
if isinstance(config, dict):
|
|
|
|
expected_binds.add(bind)
|
|
|
|
container_path = config['bind']
|
|
|
|
|
|
|
|
mode = config['mode']
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
container_path = config
|
|
|
|
|
|
|
|
mode = 'rw'
|
|
|
|
|
|
|
|
expected_binds.add("{0}:{1}:{2}".format(host_path, container_path, mode))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
actual_binds = set()
|
|
|
|
actual_binds = set()
|
|
|
|
for bind in (container['HostConfig']['Binds'] or []):
|
|
|
|
for bind in (container['HostConfig']['Binds'] or []):
|
|
|
|