Merge branch 'BANS-295' into 'rc-5.2.6'

Add validated_image_id check to if-condition of deleting image logic

See merge request rudecs/dev/decort-ansible!40
rc-5.3.0^2
commit 2f9716a51d

@ -522,7 +522,7 @@ def main():
decon.validated_image_id = decort_osimage.decort_osimage_package_facts(image_facts)['id'] decon.validated_image_id = decort_osimage.decort_osimage_package_facts(image_facts)['id']
elif amodule.params['state'] == "absent": elif amodule.params['state'] == "absent" and decon.validated_image_id:
if amodule.params['image_name'] or amodule.params['image_id'] and\ if amodule.params['image_name'] or amodule.params['image_id'] and\
decort_osimage.decort_osimage_package_facts(image_facts)['accountId'] == amodule.params['account_Id']: decort_osimage.decort_osimage_package_facts(image_facts)['accountId'] == amodule.params['account_Id']:
amodule.image_id_delete = decon.validated_image_id amodule.image_id_delete = decon.validated_image_id

Loading…
Cancel
Save