1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Remove idempotency leftovers of volumes GID,UID (#289)

Fix #282
Remove UID and GID from podman volume options.
We don't support idempotency for them due to conflicting changes
in podman versions.
This commit is contained in:
Sergey 2021-08-16 16:07:37 +03:00 committed by GitHub
parent afe55dd277
commit d707f1e7de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,6 +47,7 @@ options:
options:
description:
- Set driver specific options. For example 'device=tpmfs', 'type=tmpfs'.
UID and GID idempotency is not supported due to changes in podman.
type: list
elements: str
required: false
@ -232,6 +233,10 @@ class PodmanVolumeDiff:
def diffparam_options(self):
before = self.info['options'] if 'options' in self.info else {}
# Removing GID and UID from options list
before.pop('uid', None)
before.pop('gid', None)
# Collecting all other options in the list
before = ["=".join((k, v)) for k, v in before.items()]
after = self.params['options']
# # For UID, GID