blob: 6201bddd7be666f6eb426c391272fe7003c36c7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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
|