Merge pull request #924 from resmo/for-ansible

cloudstack: cs_account: fix error handing on state=absent
This commit is contained in:
Brian Coca 2015-09-09 08:09:27 -04:00
commit 6ba52c694d

View file

@ -326,7 +326,7 @@ class AnsibleCloudStackAccount(AnsibleCloudStack):
if not self.module.check_mode: if not self.module.check_mode:
res = self.cs.deleteAccount(id=account['id']) res = self.cs.deleteAccount(id=account['id'])
if 'errortext' in account: if 'errortext' in res:
self.module.fail_json(msg="Failed: '%s'" % res['errortext']) self.module.fail_json(msg="Failed: '%s'" % res['errortext'])
poll_async = self.module.params.get('poll_async') poll_async = self.module.params.get('poll_async')