1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

fix(podman_prune): set top-level changed status

The module was returning changed status inside nested dicts,
but Ansible expects it at the top level of the result.

Before: {"image": {"changed": true, ...}} -> Ansible sees changed=false
After:  {"changed": true, "image": {...}} -> Ansible sees changed=true
Signed-off-by: Igor Belousov <igor-belousov@users.noreply.github.com>
This commit is contained in:
Igor Belousov 2026-01-15 09:08:11 +03:00
parent 0d653874d3
commit 78c9c06019

View file

@ -251,7 +251,10 @@ def main():
system_filters["system_volumes"] = "--volumes"
results[target] = podmanExec(module, target, system_filters, executable)
module.exit_json(**results)
# Calculate global changed status from all targets
changed = any(results[k].get("changed", False) for k in results)
module.exit_json(changed=changed, **results)
if __name__ == "__main__":