atomic_image: Fix absent state (#61827)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/62012/head
Abhijeet Kasurde 5 years ago committed by GitHub
parent df49a9e58c
commit 3703c3bb1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save