mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Fix return data from podman_volume module (#106)
This commit is contained in:
parent
280af2c268
commit
cb6934de24
2 changed files with 4 additions and 2 deletions
|
|
@ -380,7 +380,7 @@ class PodmanVolumeManager:
|
|||
self.volume = PodmanVolume(self.module, self.name)
|
||||
|
||||
def update_volume_result(self, changed=True):
|
||||
"""Inspect the current container, update results with last info, exit.
|
||||
"""Inspect the current volume, update results with last info, exit.
|
||||
|
||||
Keyword Arguments:
|
||||
changed {bool} -- whether any action was performed
|
||||
|
|
@ -430,7 +430,7 @@ class PodmanVolumeManager:
|
|||
self.volume.delete()
|
||||
self.results['actions'].append('deleted %s' % self.volume.name)
|
||||
self.results.update({'changed': True})
|
||||
self.results.update({'container': {},
|
||||
self.results.update({'volume': {},
|
||||
'podman_actions': self.volume.actions})
|
||||
self.module.exit_json(**self.results)
|
||||
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@
|
|||
containers.podman.podman_volume:
|
||||
name: "{{ volume_name }}"
|
||||
state: absent
|
||||
register: delete
|
||||
|
||||
- name: Get existing volume info
|
||||
containers.podman.podman_volume_info:
|
||||
|
|
@ -106,6 +107,7 @@
|
|||
assert:
|
||||
that:
|
||||
- info10 is failed
|
||||
- delete.volume == {}
|
||||
|
||||
always:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue