diff --git a/plugins/module_utils/podman/common.py b/plugins/module_utils/podman/common.py index 4278d3a1..06c55e39 100644 --- a/plugins/module_utils/podman/common.py +++ b/plugins/module_utils/podman/common.py @@ -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: