diff --git a/cloud/cloudstack/cs_project.py b/cloud/cloudstack/cs_project.py index 390dafbaef4..943067ef5a4 100644 --- a/cloud/cloudstack/cs_project.py +++ b/cloud/cloudstack/cs_project.py @@ -224,11 +224,8 @@ class AnsibleCloudStackProject(AnsibleCloudStack): return project - def state_project(self, state=None): - project = self.get_project() - - if not project: - self.module.fail_json(msg="No project named '%s' found." % self.module.params('name')) + def state_project(self, state='active'): + project = self.present_project() if project['state'].lower() != state: self.result['changed'] = True