Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- proxmox and proxmox_kvm modules - allow uppercase characters in VM/container tags (https://github.com/ansible-collections/community.general/issues/9895, https://github.com/ansible-collections/community.general/pull/10024).
2 changes: 1 addition & 1 deletion plugins/modules/proxmox.py
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,7 @@ def content_check(self, node, ostemplate, template_store):

def validate_tags(self, tags):
"""Check if the specified tags are valid."""
re_tag = re.compile(r"^[a-z0-9_][a-z0-9_\-\+\.]*$")
re_tag = re.compile(r"^[a-zA-Z0-9_][a-zA-Z0-9_\-\+\.]*$")
for tag in tags:
if not re_tag.match(tag):
self.module.fail_json(msg="%s is not a valid tag" % tag)
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/proxmox_kvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ def create_vm(self, vmid, newid, node, name, memory, cpu, cores, sockets, update

# VM tags are expected to be valid and presented as a comma/semi-colon delimited string
if 'tags' in kwargs:
re_tag = re.compile(r'^[a-z0-9_][a-z0-9_\-\+\.]*$')
re_tag = re.compile(r'^[a-zA-Z0-9_][a-zA-Z0-9_\-\+\.]*$')
for tag in kwargs['tags']:
if not re_tag.match(tag):
self.module.fail_json(msg='%s is not a valid tag' % tag)
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/targets/proxmox/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@
name: test-instance
clone: 'yes'
state: present
tags:
- TagWithUppercaseChars
timeout: 500
register: results_kvm

Expand Down