mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-03 01:03:09 +00:00
Fix volume to support not binding volumes to host
This commit is contained in:
committed by
Matt Clay
parent
1aa1b617f5
commit
d373e0a7c4
@@ -336,7 +336,7 @@ options:
|
||||
- always
|
||||
- no
|
||||
- on-failure
|
||||
- unless-stopped
|
||||
- unless-stopped
|
||||
default: on-failure
|
||||
required: false
|
||||
restart_retries:
|
||||
@@ -831,7 +831,7 @@ class TaskParameters(DockerBaseClass):
|
||||
host = os.path.abspath(host)
|
||||
new_vols.append("%s:%s:rw" % (host, container))
|
||||
else:
|
||||
new_vols.append("%s:%s:rw" % (os.path.abspath(vol), vol))
|
||||
new_vols.append(vol)
|
||||
return new_vols
|
||||
|
||||
def _get_mounts(self):
|
||||
@@ -940,11 +940,6 @@ class TaskParameters(DockerBaseClass):
|
||||
bind=container,
|
||||
mode=mode
|
||||
)
|
||||
else:
|
||||
self.volume_binds[vol] = dict(
|
||||
bind=vol,
|
||||
mode='rw'
|
||||
)
|
||||
|
||||
|
||||
def _parse_exposed_ports(self):
|
||||
|
||||
Reference in New Issue
Block a user