With current versions of Puppet and Facter I get the same information in the lsbdistid
and operatingsystem
facts – I don't look at osfamily
because on Gentoo Linux it reports a generic "Linux" string.
When using that piece of information in Puppet modules (eg. for choosing package names to be installed) is there any technical reason or established consensus to use lsbdistid
or operatingsystem
?
Best Answer
I like
osfamily
. LSB is often not installed by default and on some distros like RHEL/CentOS the dependency chain forlsb_release
is huge. Plus, if you don't know the distro how do you know the name of the LSB package?operatingsystem
is annoying because I usually don't care whether it is RedHat vs. CentOS, or Debian vs. Ubuntu. I want to know distro families because the idiosyncrasies between distros are usually the same within families.Gentoo support was merged into facter's osfamily yesterday (Feb 13, 2013), it should make the next release. You can always use a combination of
osfamily
to check Debian or RedHat andoperatingsystem
to check for Gentoo.osfamily
andoperatingsystem
are basically just a bunch ofif
orcase
conditions. It would be pretty easy to customize your own as a custom fact or class parameter based on your needs. Like: