cloudstack: cs_project: fix state=active/suspended does not create/update project

This commit is contained in:
Rene Moser 2016-06-08 15:14:06 +02:00
parent 6fd21ae67c
commit ff29da944e

View file

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