diff options
Diffstat (limited to 'lib/facter/hardwaremodel.rb')
-rw-r--r-- | lib/facter/hardwaremodel.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/facter/hardwaremodel.rb b/lib/facter/hardwaremodel.rb index 6201bdd..8f52fef 100644 --- a/lib/facter/hardwaremodel.rb +++ b/lib/facter/hardwaremodel.rb @@ -1,3 +1,16 @@ +# Fact: hardwaremodel +# +# Purpose: +# Returns the hardware model of the system. +# +# Resolution: +# Uses purely "uname -m" on all platforms other than AIX and Windows. +# On AIX uses the parsed "modelname" output of "lsattr -El sys0 -a modelname". +# On Windows uses the 'host_cpu' pulled out of Ruby's config. +# +# Caveats: +# + Facter.add(:hardwaremodel) do setcode 'uname -m' end |