1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-21 11:19:00 +00:00

lvol: fix LVM version regex to handle date formats without dashes (#11823)

* lvol: fix LVM version regex to handle date formats without dashes

Fixes #5445

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* lvol: add changelog fragment for issue 5445

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexei Znamensky 2026-04-16 05:32:19 +12:00 committed by GitHub
parent 7dcd3c1c45
commit 7172326868
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -277,7 +277,7 @@ def get_lvm_version(module):
rc, out, err = module.run_command([ver_cmd, "version"])
if rc != 0:
return None
m = re.search(r"LVM version:\s+(\d+)\.(\d+)\.(\d+).*(\d{4}-\d{2}-\d{2})", out)
m = re.search(r"LVM version:\s+(\d+)\.(\d+)\.(\d+)", out)
if not m:
return None
return mkversion(m.group(1), m.group(2), m.group(3))