Merge "Support mode in named volumes when using podman" into stable/2023.2

This commit is contained in:
Zuul 2024-09-30 20:06:26 +00:00 committed by Gerrit Code Review
commit 2d6a3ee9eb
2 changed files with 12 additions and 2 deletions

View File

@ -176,7 +176,11 @@ class PodmanWorker(ContainerWorker):
mounts.append(mount_item)
else:
try:
src, dest = item.split(':')
mode = 'rw'
if item.count(':') == 2:
src, dest, mode = item.split(':')
else:
src, dest = item.split(':')
except ValueError:
self.module.fail_json(
msg="Wrong format of volume: {}".format(item),
@ -191,7 +195,7 @@ class PodmanWorker(ContainerWorker):
else:
filtered_volumes[src] = dict(
bind=dest,
mode='rw'
mode=mode
)
def parse_dimensions(self, dimensions):

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue, when using podman, with named volumes that use a mode
specifier. See `LP#2054834
<https://bugs.launchpad.net/kolla-ansible/+bug/2054834>`_ for more details.