mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Added Tag functionality to Volume,Template,FWRule,PF Rule,ISO,Snapshot (#23141)
* Added Tag functionality to Volume,Template,FWRule,PF Rule,ISO,Snapshot * Update cs_firewall.py Fixed whitespace * Added doc for Cloudstack Tags in Volume,Template,FWRule,PF Rule,ISO,Snapshot
This commit is contained in:
committed by
René Moser
parent
9713abe9f7
commit
e4206d8ef5
@@ -82,6 +82,14 @@ options:
|
||||
- Poll async jobs until job has finished.
|
||||
required: false
|
||||
default: true
|
||||
tags:
|
||||
description:
|
||||
- List of tags. Tags are a list of dictionaries having keys C(key) and C(value).
|
||||
- "To delete all tags, set a empty list e.g. C(tags: [])."
|
||||
required: false
|
||||
default: null
|
||||
aliases: [ 'tag' ]
|
||||
version_added: "2.4"
|
||||
extends_documentation_fragment: cloudstack
|
||||
'''
|
||||
|
||||
@@ -216,6 +224,9 @@ class AnsibleCloudStackVmSnapshot(AnsibleCloudStack):
|
||||
if res and poll_async:
|
||||
snapshot = self.poll_job(res, 'vmsnapshot')
|
||||
|
||||
if snapshot:
|
||||
snapshot = self.ensure_tags(resource=snapshot, resource_type='Snapshot')
|
||||
|
||||
return snapshot
|
||||
|
||||
|
||||
@@ -268,6 +279,7 @@ def main():
|
||||
account = dict(default=None),
|
||||
project = dict(default=None),
|
||||
poll_async = dict(type='bool', default=True),
|
||||
tags=dict(type='list', aliases=['tag'], default=None),
|
||||
))
|
||||
|
||||
required_together = cs_required_together()
|
||||
|
||||
Reference in New Issue
Block a user