Skip to content

Instantly share code, notes, and snippets.

@zachfi
Created February 9, 2014 21:48
Show Gist options
  • Save zachfi/8906497 to your computer and use it in GitHub Desktop.
Save zachfi/8906497 to your computer and use it in GitHub Desktop.
Fact: processor_mfg
# Determine the processor manufacture
Facter.add(:processor_mfg) do
confine :virtual => "physical"
setcode do
line = Facter::Util::Resolution.exec('dmidecode -s processor-version')
if line =~ /^AMD/
'amd'
elsif line =~ /^Intel/
'intel'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment