Merge pull request #34365 from sjorge/2016.3-fix-broken-smartos-grains

fixes computenode_* grains on SmartOS compute nodes
This commit is contained in:
Mike Place 2016-06-29 10:55:24 -07:00 committed by GitHub
commit 3808d849fe

View File

@ -1391,8 +1391,8 @@ def os_data():
uname_v = os.uname()[3]
grains['os'] = grains['osfullname'] = 'SmartOS'
grains['osrelease'] = uname_v[uname_v.index('_')+1:]
elif salt.utils.is_smartos_globalzone():
grains.update(_smartos_computenode_data())
if salt.utils.is_smartos_globalzone():
grains.update(_smartos_computenode_data())
elif os.path.isfile('/etc/release'):
with salt.utils.fopen('/etc/release', 'r') as fp_:
rel_data = fp_.read()