mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
* fix for #21729, use VERSION_ID instead of PRETTY_NAME to get release
This commit is contained in:
committed by
Adrian Likins
parent
19d390135e
commit
52fbfa00f9
@@ -895,7 +895,7 @@ class Distribution(object):
|
||||
if distribution_version:
|
||||
self.facts['distribution_version'] = distribution_version.group(1)
|
||||
if 'open' in data.lower():
|
||||
release = re.search("^PRETTY_NAME=[^(]+ \(?([^)]+?)\)", line)
|
||||
release = re.search('^VERSION_ID="?[0-9]+\.?([0-9]*)"?', line)
|
||||
if release:
|
||||
self.facts['distribution_release'] = release.groups()[0]
|
||||
elif 'enterprise' in data.lower() and 'VERSION_ID' in line:
|
||||
|
||||
Reference in New Issue
Block a user