Skip to content

Commit 08d2ab7

Browse files
authored
template: fix missing tags handling (#154)
* template: fix missing tags handling * add changelog
1 parent 74c5a9b commit 08d2ab7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bugfixes:
2+
- Ensure tags are applied when creating or updating a template (https://github.com/ngine-io/ansible-collection-cloudstack/pull/154).

plugins/modules/template.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,10 @@ def present_template(self):
458458
template = self.create_template()
459459
else:
460460
self.fail_json(msg="one of the following is required on state=present: url, vm")
461+
462+
if template:
463+
template = self.ensure_tags(resource=template, resource_type="Template")
464+
461465
return template
462466

463467
def create_template(self):

0 commit comments

Comments
 (0)