From: Stephen Gran Date: Sun, 4 Oct 2009 21:10:06 +0000 (+0100) Subject: Add architecture test for FreeBSD boxen. Lets see how much this breaks X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=8d18910b28123cab15ae38a8b9ecc60ac6c631c6;p=mirror%2Fdsa-puppet.git Add architecture test for FreeBSD boxen. Lets see how much this breaks Signed-off-by: Stephen Gran --- diff --git a/facts/architecture.rb b/facts/architecture.rb new file mode 100644 index 000000000..d6187b238 --- /dev/null +++ b/facts/architecture.rb @@ -0,0 +1,13 @@ +Facter.add(:architecture) do + confine :kernel => 'GNU/kFreeBSD' + setcode do + model = Facter.value(:hardwaremodel) + case model + when 'x86_64': "amd64" + when /(i[3456]86|pentium)/: "i386" + else + model + end + end +end +