diff --git a/salt/grains/core.py b/salt/grains/core.py index 203956a5ac..6c97f51a54 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py @@ -686,7 +686,12 @@ def os_data(): import lsb_release release = lsb_release.get_distro_information() for key, value in release.iteritems(): - grains['lsb_{0}'.format(key.lower())] = value # override /etc/lsb-release + key = key.lower() + lsb_param = 'lsb_{0}{1}'.format( + '' if key.startswith('distrib_') else 'distrib_', + key + ) + grains[lsb_param] = value except ImportError: # if the python library isn't available, default to regex if os.path.isfile('/etc/lsb-release'):