Allowing uppercase tags in proxmox & proxmox_kvm (#10024)

* Allowing uppercase tags in proxmox & proxmox_kvm

* Fix #9895 : fixes the 'not a valid tag' error message when the VM or container tag contains uppercase characters

* Add PR URL to changelog fragment.

---------

Co-authored-by: s1githug <sgithug@free.fr>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
s1github 2025-04-21 12:34:56 +02:00 committed by GitHub
parent e9997e08ed
commit ce421dbd7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 2 deletions

View file

@ -1126,7 +1126,7 @@ class ProxmoxKvmAnsible(ProxmoxAnsible):
# 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)