mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-29 08:01:24 -07:00
add distribution_major_version to fact gathering
This commit is contained in:
parent
466ab0a9d6
commit
7f9736198a
1 changed files with 1 additions and 0 deletions
|
@ -231,6 +231,7 @@ class Facts(object):
|
||||||
dist = platform.dist()
|
dist = platform.dist()
|
||||||
self.facts['distribution'] = dist[0].capitalize() or 'NA'
|
self.facts['distribution'] = dist[0].capitalize() or 'NA'
|
||||||
self.facts['distribution_version'] = dist[1] or 'NA'
|
self.facts['distribution_version'] = dist[1] or 'NA'
|
||||||
|
self.facts['distribution_major_version'] = dist[1].split('.')[0] or 'NA'
|
||||||
self.facts['distribution_release'] = dist[2] or 'NA'
|
self.facts['distribution_release'] = dist[2] or 'NA'
|
||||||
# Try to handle the exceptions now ...
|
# Try to handle the exceptions now ...
|
||||||
for (path, name) in Facts.OSDIST_DICT.items():
|
for (path, name) in Facts.OSDIST_DICT.items():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue