Merge "Support mode in named volumes when using podman"

This commit is contained in:
Zuul 2024-06-26 17:37:44 +00:00 committed by Gerrit Code Review
commit 35e9a1f5b2
2 changed files with 12 additions and 2 deletions

@ -177,7 +177,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),
@ -192,7 +196,7 @@ class PodmanWorker(ContainerWorker):
else:
filtered_volumes[src] = dict(
bind=dest,
mode='rw'
mode=mode
)
def parse_dimensions(self, dimensions):

@ -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.