cloudstack: cs_account: fix error handing on state=absent
This commit is contained in:
parent
5e45d9dffb
commit
6e2b97427b
1 changed files with 1 additions and 1 deletions
|
@ -326,7 +326,7 @@ class AnsibleCloudStackAccount(AnsibleCloudStack):
|
|||
if not self.module.check_mode:
|
||||
res = self.cs.deleteAccount(id=account['id'])
|
||||
|
||||
if 'errortext' in account:
|
||||
if 'errortext' in res:
|
||||
self.module.fail_json(msg="Failed: '%s'" % res['errortext'])
|
||||
|
||||
poll_async = self.module.params.get('poll_async')
|
||||
|
|
Loading…
Reference in a new issue