Sha256: 2130713d97c07fe885e6e273a6230a074d6d39fdf4beb33b4a53e89505f2cff5

Contents?: true

Size: 754 Bytes

Versions: 83

Compression:

Stored size: 754 Bytes

Contents

require 'facter/util/operatingsystem'
require 'facter/operatingsystem/linux'

module Facter
  module Operatingsystem
    class OsReleaseLinux < Linux
      def get_operatingsystem
        # Native cfacter also uses the NAME field.
        Facter::Util::Operatingsystem.os_release['NAME']
      end

      def get_osfamily
        Facter::Util::Operatingsystem.os_release['NAME']
      end

      def get_operatingsystemrelease
        @operatingsystemrelease ||= Facter::Util::Operatingsystem.os_release['VERSION_ID']
        @operatingsystemrelease
      end

      def get_operatingsystemmajrelease
        if operatingsystemrelease = get_operatingsystemrelease
          operatingsystemrelease.split(".").first
        end
      end
    end
  end
end

Version data entries

83 entries across 83 versions & 2 rubygems

Version Path
bolt-0.21.7 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.21.6 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.21.5 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.21.4 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.21.3 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.21.2 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.21.1 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.21.0 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.20.7 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.20.6 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.20.5 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.20.3 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.20.2 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.19.1 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.19.0 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.18.2 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.18.1 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.18.0 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.17.2 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb
bolt-0.17.1 vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb