mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #31539 from DSRCompany/issues/31365_centos7_osrelease_fix
Added temporary workaround for CentOS 7 os-release id bug.
This commit is contained in:
commit
96c0926298
1 changed files with 7 additions and 0 deletions
|
@ -1260,6 +1260,13 @@ def os_data():
|
|||
grains['osfullname'] = \
|
||||
grains.get('lsb_distrib_id', osname).strip()
|
||||
if 'osrelease' not in grains:
|
||||
# NOTE: This is a workaround for CentOS 7 os-release bug
|
||||
# https://bugs.centos.org/view.php?id=8359
|
||||
# /etc/os-release contains no minor distro release number so we fall back to parse
|
||||
# /etc/centos-release file instead.
|
||||
# Commit introducing this comment should be reverted after the upstream bug is released.
|
||||
if 'CentOS Linux 7' in grains.get('lsb_distrib_codename', ''):
|
||||
grains.pop('lsb_distrib_release', None)
|
||||
grains['osrelease'] = \
|
||||
grains.get('lsb_distrib_release', osrelease).strip()
|
||||
grains['oscodename'] = grains.get('lsb_distrib_codename',
|
||||
|
|
Loading…
Add table
Reference in a new issue