Commit f5021f72 by James Cammarata

Merge branch 'fixes/docker-volumes' of https://github.com/devpopol/ansible into…

Merge branch 'fixes/docker-volumes' of https://github.com/devpopol/ansible into devpopol-fixes/docker-volumes
parents 63bf2f6d 2c8564e7
......@@ -358,6 +358,13 @@ class DockerManager:
if len(parts) == 2:
self.volumes[parts[1]] = {}
self.binds[parts[0]] = parts[1]
# with bind mode
elif len(parts) == 3:
if parts[2] not in ['ro', 'rw']:
self.module.fail_json(msg='bind mode needs to either be "ro" or "rw"')
ro = parts[2] == 'ro'
self.volumes[parts[1]] = {}
self.binds[parts[0]] = {'bind': parts[1], 'ro': ro}
# docker mount (e.g. /www, mounts a docker volume /www on the container at the same location)
else:
self.volumes[parts[0]] = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment