Sha256: d79714c287b74cb668e20d78c0993e6c60008e2b9248bf1c4053e274953bab53
Contents?: true
Size: 972 Bytes
Versions: 21
Compression:
Stored size: 972 Bytes
Contents
# Fact: operatingsystemmajrelease # # Purpose: Returns the major release of the operating system. # # Resolution: splits down the operatingsystemrelease fact at decimal point for # osfamily RedHat derivatives and Debian. # # This should be the same as lsbmajdistrelease, but on minimal systems there # are too many dependencies to use LSB # # List of operatingsystems at time of writing: #"Alpine" "Amazon" "Archlinux" "Ascendos" "Bluewhite64" "CentOS" "CloudLinux" #"Debian" "Fedora" "Gentoo" "Mandrake" "Mandriva" "MeeGo" "OEL" "OpenSuSE" #"OracleLinux" "OVS" "PSBM" "RedHat" "Scientific" "Slackware" "Slamd64" "SLC" #"SLED" "SLES" "SuSE" "Ubuntu" "VMWareESX" Facter.add(:operatingsystemmajrelease) do confine :operatingsystem => [ :Amazon, :CentOS, :CloudLinux, :Debian, :Fedora, :OEL, :OracleLinux, :OVS, :RedHat, :Scientific, :SLC ] setcode do Facter.value('operatingsystemrelease').split('.').first end end
Version data entries
21 entries across 21 versions & 1 rubygems