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 return project
def state_project(self, state=None): def state_project(self, state='active'):
project = self.get_project() project = self.present_project()
if not project:
self.module.fail_json(msg="No project named '%s' found." % self.module.params('name'))
if project['state'].lower() != state: if project['state'].lower() != state:
self.result['changed'] = True self.result['changed'] = True