File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2020- name: Get Podman system information into a variable
2121 containers.podman.podman_system_info:
2222 register: podman_info
23+ - name: Printing Podman System info
24+ debug:
25+ msg: "{{ podman_info['podman_system_info'] }}
2326'''
2427
2528RETURN = r'''
@@ -187,7 +190,7 @@ def get_podman_system_info(module, executable):
187190 rc , out , err = module .run_command (command )
188191 out = out .strip ()
189192 if out :
190- return out
193+ return json . loads ( out )
191194
192195 module .log (msg = "Unable to get podman system info: %s" % err )
193196 return json .dumps ([])
@@ -196,14 +199,11 @@ def main():
196199 module = AnsibleModule (
197200 argument_spec = dict (
198201 executable = dict (type = 'str' , default = 'podman' ),
199- name = dict (type = 'list' , elements = 'str' )
200202 ),
201203 supports_check_mode = True ,
202204 )
203205
204- executable = module .params ['executable' ]
205- name = module .params .get ('name' )
206- executable = module .get_bin_path (executable , required = True )
206+ executable = module .get_bin_path (module .params ['executable' ], required = True )
207207
208208 results = get_podman_system_info (module , executable )
209209
You can’t perform that action at this time.
0 commit comments