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:
parent
132baa18e4
commit
8f5842dea6
2 changed files with 63 additions and 0 deletions
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue