Skip to content

Commit

Permalink
Merge pull request ansible#19653 from Thingee/verify_openstack_images
Browse files Browse the repository at this point in the history
Verify image exists when passed for open stack server creation
  • Loading branch information
emonty authored Dec 26, 2016
2 parents 021756a + 6d32dba commit 0bb7149
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ansible/modules/cloud/openstack/os_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ def _create_server(module, cloud):
if not module.params['boot_volume']:
image_id = cloud.get_image_id(
module.params['image'], module.params['image_exclude'])
if not image_id:
module.fail_json(msg="Could not find image %s" %
module.params['image'])

if flavor:
flavor_dict = cloud.get_flavor(flavor)
Expand Down

0 comments on commit 0bb7149

Please sign in to comment.