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:
parent
0d653874d3
commit
78c9c06019
1 changed files with 4 additions and 1 deletions
|
|
@ -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__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue