summaryrefslogtreecommitdiffstats
path: root/lib/facter/architecture.rb
blob: 3665a7fb99d56e0d38da06e246776319a508c357 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Facter.add(:architecture) do
    confine :kernel => :linux
    setcode do
        model = Facter.value(:hardwaremodel)
        case model
        # most linuxen use "x86_64"
        when 'x86_64':
            Facter.value(:operatingsystem) == "Debian" ? "amd64" : model;
        when /(i[3456]86|pentium)/: "i386"
        else
            model
        end
    end
end