From da3db1bfda66940bdf7c57c488926ab00dc5f95b Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Fri, 26 Jun 2015 09:39:53 +0200 Subject: [PATCH] cloudstack: fix cs_instance can not find iso and disk offering if domain is set. This does only affect root admins. --- lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py index c2a4c06686..ef3cc4e34b 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_instance.py @@ -388,6 +388,7 @@ class AnsibleCloudStackInstance(AnsibleCloudStack): args['domainid'] = self.get_domain('id') args['projectid'] = self.get_project('id') args['zoneid'] = self.get_zone('id') + args['isrecursive'] = True if template: if self.template: @@ -421,10 +422,7 @@ class AnsibleCloudStackInstance(AnsibleCloudStack): if not disk_offering: return None - args = {} - args['domainid'] = self.get_domain('id') - - disk_offerings = self.cs.listDiskOfferings(**args) + disk_offerings = self.cs.listDiskOfferings() if disk_offerings: for d in disk_offerings['diskoffering']: if disk_offering in [ d['displaytext'], d['name'], d['id'] ]: