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

Fix idempotency for systemd generations (#776)

Fix #775

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
Sergey 2024-06-07 00:08:02 +03:00 committed by GitHub
parent 510d8ad35b
commit 8a8f9023e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -876,7 +876,6 @@ class PodmanDefaults:
self.defaults = {
"detach": True,
"log_level": "error",
"rm": False,
"tty": False,
}
@ -993,14 +992,18 @@ class PodmanContainerDiff:
def diffparam_cgroupns(self):
return self._diff_generic('cgroupns', '--cgroupns')
def diffparam_cgroups(self):
return self._diff_generic('cgroups', '--cgroups')
# Disabling idemotency check for cgroups as it's added by systemd generator
# https://github.com/containers/ansible-podman-collections/issues/775
# def diffparam_cgroups(self):
# return self._diff_generic('cgroups', '--cgroups')
def diffparam_chrootdirs(self):
return self._diff_generic('chrootdirs', '--chrootdirs')
def diffparam_cidfile(self):
return self._diff_generic('cidfile', '--cidfile')
# Disabling idemotency check for cidfile as it's added by systemd generator
# https://github.com/containers/ansible-podman-collections/issues/775
# def diffparam_cidfile(self):
# return self._diff_generic('cidfile', '--cidfile')
def diffparam_command(self):
# TODO(sshnaidm): to inspect image to get the default command
@ -1333,12 +1336,16 @@ class PodmanContainerDiff:
def diffparam_rootfs(self):
return self._diff_generic('rootfs', '--rootfs')
def diffparam_sdnotify(self):
return self._diff_generic('sdnotify', '--sdnotify')
# Disabling idemotency check for sdnotify as it's added by systemd generator
# https://github.com/containers/ansible-podman-collections/issues/775
# def diffparam_sdnotify(self):
# return self._diff_generic('sdnotify', '--sdnotify')
def diffparam_rm(self):
before = self.info['hostconfig']['autoremove']
after = self.params['rm']
if after is None:
return self._diff_update_and_compare('rm', '', '')
return self._diff_update_and_compare('rm', before, after)
def diffparam_rmi(self):