Sha256: 8f55a92679d3a2408ab3de6af8c5d982efdf3592dd88374a8604c4a544c05466

Contents?: true

Size: 931 Bytes

Versions: 33

Compression:

Stored size: 931 Bytes

Contents

# Fact: osfamily
#
# Purpose: Returns the operating system
#
# Resolution:
#   Maps operating systems to operating system families, such as linux
#   distribution derivatives. Adds mappings from specific operating systems
#   to kernels in the case that it is relevant.
#
# Caveats:
#   This fact is completely reliant on the operatingsystem fact, and no
#   heuristics are used
#

Facter.add(:osfamily) do

  setcode do
    case Facter.value(:operatingsystem)
    when "RedHat", "Fedora", "CentOS", "Scientific", "SLC", "Ascendos", "CloudLinux", "PSBM", "OracleLinux", "OVS", "OEL", "Amazon", "XenServer"
      "RedHat"
    when "Ubuntu", "Debian"
      "Debian"
    when "SLES", "SLED", "OpenSuSE", "SuSE"
      "Suse"
    when "Solaris", "Nexenta", "OmniOS", "OpenIndiana", "SmartOS"
      "Solaris"
    when "Gentoo"
      "Gentoo"
    when "Archlinux"
      "Archlinux"
    else
      Facter.value("kernel")
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
facter-1.7.6 lib/facter/osfamily.rb
facter-2.0.2 lib/facter/osfamily.rb
facter-2.0.2-x86-mingw32 lib/facter/osfamily.rb
facter-2.0.2-universal-darwin lib/facter/osfamily.rb
facter-2.0.1 lib/facter/osfamily.rb
facter-2.0.1-x86-mingw32 lib/facter/osfamily.rb
facter-2.0.1-universal-darwin lib/facter/osfamily.rb
facter-2.0.1.rc4 lib/facter/osfamily.rb
facter-2.0.1.rc4-x86-mingw32 lib/facter/osfamily.rb
facter-2.0.1.rc4-universal-darwin lib/facter/osfamily.rb
facter-2.0.1.rc3 lib/facter/osfamily.rb
facter-2.0.1.rc3-x86-mingw32 lib/facter/osfamily.rb
facter-2.0.1.rc3-universal-darwin lib/facter/osfamily.rb
facter-2.0.1.rc2 lib/facter/osfamily.rb
facter-2.0.1.rc2-x86-mingw32 lib/facter/osfamily.rb
facter-2.0.1.rc2-universal-darwin lib/facter/osfamily.rb
facter-2.0.1.rc1 lib/facter/osfamily.rb
facter-2.0.1.rc1-x86-mingw32 lib/facter/osfamily.rb
facter-2.0.1.rc1-universal-darwin lib/facter/osfamily.rb
facter-1.7.5 lib/facter/osfamily.rb