|
|
@ -53,6 +53,13 @@ options:
|
|
|
|
- Account the project is related to.
|
|
|
|
- Account the project is related to.
|
|
|
|
required: false
|
|
|
|
required: false
|
|
|
|
default: null
|
|
|
|
default: null
|
|
|
|
|
|
|
|
tags:
|
|
|
|
|
|
|
|
description:
|
|
|
|
|
|
|
|
- List of tags. Tags are a list of dictionaries having keys C(key) and C(value).
|
|
|
|
|
|
|
|
- "If you want to delete all tags, set a empty list e.g. C(tags: [])."
|
|
|
|
|
|
|
|
required: false
|
|
|
|
|
|
|
|
default: null
|
|
|
|
|
|
|
|
version_added: "2.2"
|
|
|
|
poll_async:
|
|
|
|
poll_async:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Poll async jobs until job has finished.
|
|
|
|
- Poll async jobs until job has finished.
|
|
|
@ -66,6 +73,9 @@ EXAMPLES = '''
|
|
|
|
- local_action:
|
|
|
|
- local_action:
|
|
|
|
module: cs_project
|
|
|
|
module: cs_project
|
|
|
|
name: web
|
|
|
|
name: web
|
|
|
|
|
|
|
|
tags:
|
|
|
|
|
|
|
|
- { key: admin, value: john }
|
|
|
|
|
|
|
|
- { key: foo, value: bar }
|
|
|
|
|
|
|
|
|
|
|
|
# Rename a project
|
|
|
|
# Rename a project
|
|
|
|
- local_action:
|
|
|
|
- local_action:
|
|
|
@ -167,6 +177,10 @@ class AnsibleCloudStackProject(AnsibleCloudStack):
|
|
|
|
project = self.create_project(project)
|
|
|
|
project = self.create_project(project)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
project = self.update_project(project)
|
|
|
|
project = self.update_project(project)
|
|
|
|
|
|
|
|
if project:
|
|
|
|
|
|
|
|
project = self.ensure_tags(resource=project, resource_type='project')
|
|
|
|
|
|
|
|
# refresh resource
|
|
|
|
|
|
|
|
self.project = project
|
|
|
|
return project
|
|
|
|
return project
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -267,6 +281,7 @@ def main():
|
|
|
|
domain = dict(default=None),
|
|
|
|
domain = dict(default=None),
|
|
|
|
account = dict(default=None),
|
|
|
|
account = dict(default=None),
|
|
|
|
poll_async = dict(type='bool', default=True),
|
|
|
|
poll_async = dict(type='bool', default=True),
|
|
|
|
|
|
|
|
tags=dict(type='list', aliases=['tag'], default=None),
|
|
|
|
))
|
|
|
|
))
|
|
|
|
|
|
|
|
|
|
|
|
module = AnsibleModule(
|
|
|
|
module = AnsibleModule(
|
|
|
|