Skip to content

Commit

Permalink
Fix idempotency for containers with env vars containing MAX_SIZE (#893)
Browse files Browse the repository at this point in the history
Signed-off-by: Popkornium18 <[email protected]>
  • Loading branch information
Popkornium18 authored Jan 19, 2025
1 parent 16b034b commit a45d94d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/module_utils/podman/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,10 @@ def diff_generic(params, info_config, module_arg, cmd_arg, boolean_type=False):
else:
before = ''
elif isinstance(after, dict):
if module_arg == "log_opt" and "max_size" in after:
after["max-size"] = after.pop("max_size")
after = ",".join(sorted(
[str(k).lower().replace("max_size", "max-size") + "=" + str(v).lower()
for k, v in after.items() if v is not None]))
[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:
Expand Down

0 comments on commit a45d94d

Please sign in to comment.