docker_container: add support for nocopy mode (#59043)
* Add support for nocopy mode.
* Add changelog.
(cherry picked from commit fa7c387f9b
)
This commit is contained in:
parent
eb8c4eaa01
commit
1e20cc8bd1
2 changed files with 5 additions and 3 deletions
2
changelogs/fragments/59043-docker_container-nocopy.yml
Normal file
2
changelogs/fragments/59043-docker_container-nocopy.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- "docker_container - add support for ``nocopy`` mode for volumes."
|
|
@ -641,8 +641,8 @@ options:
|
||||||
- List of volumes to mount within the container.
|
- List of volumes to mount within the container.
|
||||||
- "Use docker CLI-style syntax: C(/host:/container[:mode])"
|
- "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),
|
- "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).
|
C(delegated), C(cached), C(rprivate), C(private), C(rshared), C(shared), C(rslave), C(slave), and
|
||||||
Note that the docker daemon might not support all modes and combinations of such modes."
|
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
|
- SELinux hosts can additionally use C(z) or C(Z) to use a shared or
|
||||||
private label for the volume.
|
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),
|
- "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):
|
def is_volume_permissions(input):
|
||||||
for part in input.split(','):
|
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 False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue