diff --git a/lib/ansible/modules/cloud/cloudstack/cs_cluster.py b/lib/ansible/modules/cloud/cloudstack/cs_cluster.py index 790d26e387..685752df45 100644 --- a/lib/ansible/modules/cloud/cloudstack/cs_cluster.py +++ b/lib/ansible/modules/cloud/cloudstack/cs_cluster.py @@ -335,8 +335,7 @@ class AnsibleCloudStackCluster(AnsibleCloudStack): cluster = None if not self.module.check_mode: res = self.query_api('addCluster', **args) - if 'errortext' in res: - self.module.fail_json(msg="Failed: '%s'" % res['errortext']) + # API returns a list as result CLOUDSTACK-9205 if isinstance(res['cluster'], list): cluster = res['cluster'][0]