1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

cloudstack: cs_account: fix error handing on state=absent

This commit is contained in:
Rene Moser 2015-09-06 01:42:56 +02:00 committed by Matt Clay
parent c230c66324
commit badc5298a2

View file

@ -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')