summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fontein <felix@fontein.de>2019-07-13 20:50:32 +0200
committerToshio Kuratomi <a.badger@gmail.com>2019-07-17 09:24:21 -0700
commit1e20cc8bd1bd6e817d03ed9e4ad320d64b61ce64 (patch)
tree53c4d3043f31e209df14037f38d048c01161d4a8
parenteb8c4eaa01683f3c0008c4329cab2c006bbbc4d7 (diff)
downloadansible-1e20cc8bd1bd6e817d03ed9e4ad320d64b61ce64.tar.gz
docker_container: add support for nocopy mode (#59043)
* Add support for nocopy mode. * Add changelog. (cherry picked from commit fa7c387f9b975aa3214d958732ed77824a0e2fcc)
-rw-r--r--changelogs/fragments/59043-docker_container-nocopy.yml2
-rw-r--r--lib/ansible/modules/cloud/docker/docker_container.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/changelogs/fragments/59043-docker_container-nocopy.yml b/changelogs/fragments/59043-docker_container-nocopy.yml
new file mode 100644
index 0000000000..a60b21e47d
--- /dev/null
+++ b/changelogs/fragments/59043-docker_container-nocopy.yml
@@ -0,0 +1,2 @@
+bugfixes:
+- "docker_container - add support for ``nocopy`` mode for volumes."
diff --git a/lib/ansible/modules/cloud/docker/docker_container.py b/lib/ansible/modules/cloud/docker/docker_container.py
index 85817169cb..ad3aeb0e63 100644
--- a/lib/ansible/modules/cloud/docker/docker_container.py
+++ b/lib/ansible/modules/cloud/docker/docker_container.py
@@ -641,8 +641,8 @@ options:
- List of volumes to mount within the container.
- "Use docker CLI-style syntax: C(/host:/container[:mode])"
- "Mount modes can be a comma-separated list of various modes such as C(ro), C(rw), C(consistent),
- C(delegated), C(cached), C(rprivate), C(private), C(rshared), C(shared), C(rslave), C(slave).
- Note that the docker daemon might not support all modes and combinations of such modes."
+ C(delegated), C(cached), C(rprivate), C(private), C(rshared), C(shared), C(rslave), C(slave), and
+ C(nocopy). Note that the docker daemon might not support all modes and combinations of such modes."
- SELinux hosts can additionally use C(z) or C(Z) to use a shared or
private label for the volume.
- "Note that Ansible 2.7 and earlier only supported one mode, which had to be one of C(ro), C(rw),
@@ -982,7 +982,7 @@ REQUIRES_CONVERSION_TO_BYTES = [
def is_volume_permissions(input):
for part in input.split(','):
- if part not in ('rw', 'ro', 'z', 'Z', 'consistent', 'delegated', 'cached', 'rprivate', 'private', 'rshared', 'shared', 'rslave', 'slave'):
+ if part not in ('rw', 'ro', 'z', 'Z', 'consistent', 'delegated', 'cached', 'rprivate', 'private', 'rshared', 'shared', 'rslave', 'slave', 'nocopy'):
return False
return True