Consider adding the os::distro fact
chrisowensboston opened this issue · comments
Consider adding the os::distro fact. I run into puppet manifests that use codename to select templates, for example.
If you are interested I'll do this and submit a PR
I don't understand this request. It looks like this fact is already present : https://github.com/camptocamp/facterdb/blob/master/facts/3.3/debian-8-x86_64.facts#L209-L220
It is present for some OS and not for others. I noticed it missing for CentOS 6 and 7 and Redhat 6 and 7.
When I run Facter on a CentOS 6 machine, I get this:
os => {
architecture => "x86_64",
distro => {
codename => "Final",
description => "CentOS release 6.8 (Final)",
id => "CentOS",
release => {
full => "6.8",
major => "6",
minor => "8"
},
specification => ":base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch"
},
family => "RedHat",
hardware => "x86_64",
name => "CentOS",
release => {
full => "6.8",
major => "6",
minor => "8"
},
selinux => {
config_mode => "enforcing",
current_mode => "enforcing",
enabled => true,
enforced => true,
policy_version => "24"
}
}
Maybe this fact requires lsb-core
which is not installed by default on RHEL.
Yes, the os.distro fact comes from lsb_release, so the package containing that program needs to be installed (redhat-lsb-core on Fedora and derivatives, lsb-release on Debian and derivatives).
I think this project should not supports facts that are not available by default.
I think there are standard facts that could be used instead of os::distro
.
I agree with @mcanevet that the facterdb factsets should represent the facts that are available on a system by default, otherwise they're not accurate representations.