atomic_image: Fix absent state (#61827)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
df49a9e58c
commit
3703c3bb1a
2 changed files with 3 additions and 0 deletions
2
changelogs/fragments/atomic_image_absent.yml
Normal file
2
changelogs/fragments/atomic_image_absent.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- Run command in absent state in atomic_image module.
|
|
@ -116,6 +116,7 @@ def core(module):
|
|||
module.exit_json(msg=(out + out_run), changed=changed)
|
||||
elif state == 'absent':
|
||||
args = ['atomic', 'images', 'delete', "--storage=%s" % backend, image]
|
||||
rc, out, err = module.run_command(args, check_rc=False)
|
||||
if rc < 0:
|
||||
module.fail_json(rc=rc, msg=err)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue