atomic_image: Fix absent state (#61827)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2019-09-09 14:38:32 +05:30 committed by GitHub
parent df49a9e58c
commit 3703c3bb1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- Run command in absent state in atomic_image module.

View file

@ -116,6 +116,7 @@ def core(module):
module.exit_json(msg=(out + out_run), changed=changed) module.exit_json(msg=(out + out_run), changed=changed)
elif state == 'absent': elif state == 'absent':
args = ['atomic', 'images', 'delete', "--storage=%s" % backend, image] args = ['atomic', 'images', 'delete', "--storage=%s" % backend, image]
rc, out, err = module.run_command(args, check_rc=False)
if rc < 0: if rc < 0:
module.fail_json(rc=rc, msg=err) module.fail_json(rc=rc, msg=err)
else: else: