cloudstack: cs_project: fix state=active/suspended does not create/update project
This commit is contained in:
parent
6fd21ae67c
commit
ff29da944e
1 changed files with 2 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue