provision: Include DISTRIB_FAMILY in parse_lsb_release output.

This commit is contained in:
rht
2019-01-06 01:28:02 +00:00
committed by Tim Abbott
parent d9ef3fd505
commit 15763f8545
2 changed files with 6 additions and 3 deletions

View File

@@ -120,7 +120,7 @@ if (not is_rhel_based) and (not os.path.exists("/usr/bin/lsb_release")):
distro_info = parse_lsb_release()
vendor = distro_info['DISTRIB_ID']
codename = distro_info['DISTRIB_CODENAME']
family = 'redhat' if vendor in ['CentOS', 'Fedora', 'RedHat'] else 'debian'
family = distro_info['DISTRIB_FAMILY']
if not (vendor in SUPPORTED_PLATFORMS and codename in SUPPORTED_PLATFORMS[vendor]):
logging.critical("Unsupported platform: {} {}".format(vendor, codename))
sys.exit(1)