From 2c1d8c9d884d7991c1ca7fb0e36cdf54b1474705 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Tue, 28 Jul 2015 00:45:40 +0100 Subject: [PATCH] Remove facts that no longer work with puppetserver --- lib/facter/operatingsystem.rb | 15 -------------- lib/facter/osfamily.rb | 39 ----------------------------------- 2 files changed, 54 deletions(-) delete mode 100644 lib/facter/operatingsystem.rb delete mode 100644 lib/facter/osfamily.rb diff --git a/lib/facter/operatingsystem.rb b/lib/facter/operatingsystem.rb deleted file mode 100644 index 66fc0a4..0000000 --- a/lib/facter/operatingsystem.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'facter/util/operatingsystem' - -Facter.add(:operatingsystem) do - # Sabayon Linux is a variant of Gentoo so this resolution needs to come - # before the Gentoo resolution. - has_weight(10) - confine :kernel => :linux - - setcode do - release_info = Facter::Util::Operatingsystem.os_release - if release_info['NAME'] == "Sabayon" - 'Sabayon' - end - end -end diff --git a/lib/facter/osfamily.rb b/lib/facter/osfamily.rb deleted file mode 100644 index 27bcad4..0000000 --- a/lib/facter/osfamily.rb +++ /dev/null @@ -1,39 +0,0 @@ -# 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 - - has_weight(10) - - setcode do - case Facter.value(:operatingsystem) - when "RedHat", "Fedora", "CentOS", "Scientific", "SLC", "Ascendos", "CloudLinux", "PSBM", "OracleLinux", "OVS", "OEL", "Amazon", "XenServer" - "RedHat" - when "LinuxMint", "Ubuntu", "Debian", "CumulusLinux" - "Debian" - when "SLES", "SLED", "OpenSuSE", "SuSE" - "Suse" - when "Solaris", "Nexenta", "OmniOS", "OpenIndiana", "SmartOS" - "Solaris" - when "Gentoo", "Sabayon" - "Gentoo" - when "Archlinux" - "Archlinux" - when "Mageia", "Mandriva", "Mandrake" - "Mandrake" - else - Facter.value("kernel") - end - end -end