mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Fix idempotency for empty values (#790)
Fix #788 Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
parent
f9aa8878fd
commit
24c842fdd6
2 changed files with 42 additions and 0 deletions
|
|
@ -404,11 +404,15 @@ def diff_generic(params, info_config, module_arg, cmd_arg, boolean_type=False):
|
|||
after = ",".join(sorted([str(i).lower() for i in after]))
|
||||
if before:
|
||||
before = ",".join(sorted([str(i).lower() for i in before]))
|
||||
else:
|
||||
before = ''
|
||||
elif isinstance(after, dict):
|
||||
after = ",".join(sorted(
|
||||
[str(k).lower() + "=" + str(v).lower() for k, v in after.items() if v is not None]))
|
||||
if before:
|
||||
before = ",".join(sorted([j.lower() for j in before]))
|
||||
else:
|
||||
before = ''
|
||||
elif isinstance(after, bool):
|
||||
after = str(after).capitalize()
|
||||
if before is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue