| I use Puppet (and for that also Facter) to manage opensuse Leap 15.x based installations. I updated Facter now to 4.0.26 (for testing) and found out `facter osfamily` wrongly reports my system as 'Suse opensuse` instead of 'Suse' (as it was with Facter 3.14.x) or 'Opensuse' (as what i can expect based on /etc/os-release). I don't know if this is really a bug, but for me (at least) it does break some puppet modules,. It seems that the new facter (4.x, former facter-ng) at first looks to the ID_LIKE entry in /etc/os-release.
# cat /etc/os-release |
NAME="openSUSE Leap" |
VERSION="15.0" |
ID="opensuse-leap" |
ID_LIKE="suse opensuse" |
VERSION_ID="15.0" |
PRETTY_NAME="openSUSE Leap 15.0" |
ANSI_COLOR="0;32" |
CPE_NAME="cpe:/o:opensuse:leap:15.0" |
BUG_REPORT_URL="https://bugs.opensuse.org" |
HOME_URL="https://www.opensuse.org/" |
# facter osfamily |
Suse opensuse |
When I change ID_LIKE to 'Suse' , it give the desired result (as it was in facter 3.x).
# cat /etc/os-release | grep ID_LIKE |
ID_LIKE="Suse" |
# facter osfamily |
Suse
|
When deleting the whole ID_LIKE variable, Facter comes closer to an good answer (which is the value from ID). But, personally from me, still undesirable.
# facter osfamily |
Opensuse-leap
|
According to Suse documentation (https://en.opensuse.org/SDB:Find_openSUSE_version), ID_LIKE is filled with tag-like values. From (man os-release): "It should list identifiers of operating systems that are closely related to the local operating system in regards to packaging and programming interfaces, for example listing one or more OS identifiers the local OS is a derivative from." Personally, I would like my system (Opensuse Leap 15.x) to be reported as 'Suse' (to keep compatibility with existing puppet modules that rely on '$facts[osfamily]' to determine the type of system. A value of 'Opensuse' can maybe also acceptable (as it comes from the first part of the CPE_NAME). Unfortunately, my ruby coding skills (and deeper understanding of Facter) are 0, so proposing a fix will be very hard for me. full OS identification with Facter 4.0.26:
# cat /etc/os-release |
NAME="openSUSE Leap" |
VERSION="15.0" |
ID="opensuse-leap" |
ID_LIKE="suse opensuse" |
VERSION_ID="15.0" |
PRETTY_NAME="openSUSE Leap 15.0" |
ANSI_COLOR="0;32" |
CPE_NAME="cpe:/o:opensuse:leap:15.0" |
BUG_REPORT_URL="https://bugs.opensuse.org" |
HOME_URL="https://www.opensuse.org/" |
# facter --version |
4.0.26 |
# facter os |
{ |
architecture => "x86_64", |
distro => { |
codename => "n/a", |
description => "openSUSE Leap 15.0", |
id => "openSUSE", |
release => { |
full => "15.0", |
major => "15", |
minor => "0" |
}, |
specification => "n/a" |
}, |
family => "Suse opensuse", |
hardware => "x86_64", |
name => "openSUSE", |
release => { |
full => "15.0", |
major => "15.0" |
}, |
selinux => { |
enabled => false |
} |
}
|
|