From ff29da944ed05ce41a5b8bd81033387777e0bbc5 Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Wed, 8 Jun 2016 15:14:06 +0200 Subject: [PATCH] cloudstack: cs_project: fix state=active/suspended does not create/update project --- cloud/cloudstack/cs_project.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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