lib/ohai/plugins/linux/platform.rb in ohai-16.10.7 vs lib/ohai/plugins/linux/platform.rb in ohai-16.12.3

- old
+ new

@@ -110,19 +110,20 @@ # the platform mappings between the 'ID' field in /etc/os-release and the value # ohai uses. If you're adding a new platform here and you want to change the name # you'll want to add it here and then add a spec for the platform_id_remap method { - "rhel" => "redhat", + "alinux" => "alibabalinux", "amzn" => "amazon", + "archarm" => "arch", + "cumulus-linux" => "cumulus", "ol" => "oracle", - "sles" => "suse", - "sles_sap" => "suse", "opensuse-leap" => "opensuseleap", + "rhel" => "redhat", + "sles_sap" => "suse", + "sles" => "suse", "xenenterprise" => "xenserver", - "cumulus-linux" => "cumulus", - "archarm" => "arch", }[id] || id end # # Determines the platform_family based on the platform @@ -134,10 +135,10 @@ def platform_family_from_platform(plat) case plat when /debian/, /ubuntu/, /linuxmint/, /raspbian/, /cumulus/, /kali/, /pop/ # apt-get+dpkg almost certainly goes here "debian" - when /oracle/, /centos/, /redhat/, /almalinux/, /scientific/, /enterpriseenterprise/, /xcp/, /xenserver/, /cloudlinux/, /ibm_powerkvm/, /parallels/, /nexus_centos/, /clearos/, /bigip/ # Note that 'enterpriseenterprise' is oracle's LSB "distributor ID" + when /oracle/, /centos/, /redhat/, /almalinux/, /scientific/, /enterpriseenterprise/, /xcp/, /xenserver/, /cloudlinux/, /ibm_powerkvm/, /parallels/, /nexus_centos/, /clearos/, /bigip/, /alibabalinux/, /sangoma/ # Note that 'enterpriseenterprise' is oracle's LSB "distributor ID" # NOTE: "rhel" should be reserved exclusively for recompiled rhel versions that are nearly perfectly compatible down to the platform_version. # The operating systems that are "rhel" should all be as compatible as rhel7 = centos7 = oracle7 = scientific7 (98%-ish core RPM version compatibility # and the version numbers MUST track the upstream). The appropriate EPEL version repo should work nearly perfectly. Some variation like the # oracle kernel version differences and tuning and extra packages are clearly acceptable. Almost certainly some distros above (xenserver?) # should not be in this list. Please use fedora, below, instead. Also note that this is the only platform_family with this strict of a rule,