1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-03-22 02:29:08 +00:00

Fix idempotency for labels in pods (#482)

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
Sergey 2022-09-20 12:12:17 +03:00 committed by GitHub
parent 31dbd55579
commit 853d3a8cc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -396,6 +396,11 @@ class PodmanPodDiff:
else:
before = self.info['labels'] if 'labels' in self.info else {}
after = self.params['label']
# Strip out labels that are coming from systemd files
# https://github.com/containers/ansible-podman-collections/issues/276
if 'podman_systemd_unit' in before:
after.pop('podman_systemd_unit', None)
before.pop('podman_systemd_unit', None)
return self._diff_update_and_compare('label', before, after)
# TODO(sshnaidm): https://github.com/containers/podman/pull/6956