1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-04-28 03:48:51 +00:00

Add idempotency for restart-policy for containers (#548)

Fix: #440

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
Sergey 2023-02-12 13:00:00 +02:00 committed by GitHub
parent 132baa18e4
commit 8f5842dea6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 63 additions and 0 deletions

View file

@ -1163,6 +1163,11 @@ class PodmanContainerDiff:
after = self.params['read_only']
return self._diff_update_and_compare('read_only', before, after)
def diffparam_restart_policy(self):
before = self.info['hostconfig']['restartpolicy']['name']
after = self.params['restart_policy'] or ""
return self._diff_update_and_compare('restart_policy', before, after)
def diffparam_rm(self):
before = self.info['hostconfig']['autoremove']
after = self.params['rm']