From d373e0a7c44aa949a8ee6dba66076a0d5fee2ea0 Mon Sep 17 00:00:00 2001 From: Jirayut 'Dear' Nimsaeng Date: Wed, 1 Jun 2016 17:26:51 +0700 Subject: [PATCH] Fix volume to support not binding volumes to host --- lib/ansible/modules/cloud/docker/docker_container.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/ansible/modules/cloud/docker/docker_container.py b/lib/ansible/modules/cloud/docker/docker_container.py index 474ef881f5c..1e21c8d794d 100644 --- a/lib/ansible/modules/cloud/docker/docker_container.py +++ b/lib/ansible/modules/cloud/docker/docker_container.py @@ -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):