cloudstack: utils: fail friendlier if no zones available (#19332)

pull/19377/head
René Moser 8 years ago committed by GitHub
parent f28b5a0ed8
commit 18b7852940

@ -407,6 +407,9 @@ class AnsibleCloudStack(object):
zone = os.environ.get('CLOUDSTACK_ZONE')
zones = self.cs.listZones()
if not zones:
self.module.fail_json(msg="No zones available. Please create a zone first")
# use the first zone if no zone param given
if not zone:
self.zone = zones['zone'][0]

Loading…
Cancel
Save