mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Return an error if volume_src wasn't found
This commit is contained in:
@@ -116,6 +116,8 @@ def _present_volume(module, cloud):
|
||||
|
||||
if module.params['volume_src']:
|
||||
volume_id = cloud.get_volume_id(module.params['volume_src'])
|
||||
if not volume_id:
|
||||
module.fail_json(msg="Failed to find volume source '%s'" % module.params['volume_src'])
|
||||
volume_args['source_volid'] = volume_id
|
||||
|
||||
volume = cloud.create_volume(
|
||||
|
||||
Reference in New Issue
Block a user