Always check other OS release files if lsb_distrib_id grain not populated from /etc/lsb-release

Fixes #19953
This commit is contained in:
Johan van den Dorpe 2015-03-20 15:48:42 +00:00 committed by Justin Findlay
parent c27692cdab
commit 4fe795f66c

View File

@ -948,7 +948,8 @@ def os_data():
grains[ grains[
'lsb_{0}'.format(match.groups()[0].lower()) 'lsb_{0}'.format(match.groups()[0].lower())
] = match.groups()[1].rstrip() ] = match.groups()[1].rstrip()
elif os.path.isfile('/etc/os-release'): if 'lsb_distrib_id' not in grains:
if os.path.isfile('/etc/os-release'):
# Arch ARM Linux # Arch ARM Linux
with salt.utils.fopen('/etc/os-release') as ifile: with salt.utils.fopen('/etc/os-release') as ifile:
# Imitate lsb-release # Imitate lsb-release