cloudstack: cs_project: add tag support

reviewable/pr18780/r1
Rene Moser 9 years ago
parent 5d900b7a77
commit 6fd21ae67c

@ -53,6 +53,13 @@ options:
- Account the project is related to.
required: false
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:
description:
- Poll async jobs until job has finished.
@ -66,6 +73,9 @@ EXAMPLES = '''
- local_action:
module: cs_project
name: web
tags:
- { key: admin, value: john }
- { key: foo, value: bar }
# Rename a project
- local_action:
@ -167,6 +177,10 @@ class AnsibleCloudStackProject(AnsibleCloudStack):
project = self.create_project(project)
else:
project = self.update_project(project)
if project:
project = self.ensure_tags(resource=project, resource_type='project')
# refresh resource
self.project = project
return project
@ -267,6 +281,7 @@ def main():
domain = dict(default=None),
account = dict(default=None),
poll_async = dict(type='bool', default=True),
tags=dict(type='list', aliases=['tag'], default=None),
))
module = AnsibleModule(

Loading…
Cancel
Save