Sha256: f4ce515a0bae028a5674d99c93d693860beaf06f64fbd2d4c4682159acd3c6f4

Contents?: true

Size: 459 Bytes

Versions: 8

Compression:

Stored size: 459 Bytes

Contents

Facter.add(:hardwaremodel) do
    setcode 'uname -m'
end

Facter.add(:hardwaremodel) do
    confine :operatingsystem => :aix
    setcode do
        model = Facter::Util::Resolution.exec('lsattr -El sys0 -a modelname')
        if model =~ /modelname\s(\S+)\s/
            $1
        end
    end
end

Facter.add(:hardwaremodel) do
    confine :operatingsystem => :windows
    setcode do
        require 'rbconfig'
        Config::CONFIG['host_cpu']
    end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
facter-1.5.9 lib/facter/hardwaremodel.rb
facter-1.5.8 lib/facter/hardwaremodel.rb
facter-1.5.7 lib/facter/hardwaremodel.rb
facter-1.5.4 lib/facter/hardwaremodel.rb
facter-1.5.3 lib/facter/hardwaremodel.rb
facter-1.5.2 lib/facter/hardwaremodel.rb
facter-1.5.6 lib/facter/hardwaremodel.rb
facter-1.5.5 lib/facter/hardwaremodel.rb