]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Add architecture test for FreeBSD boxen. Lets see how much this breaks
authorStephen Gran <steve@lobefin.net>
Sun, 4 Oct 2009 21:10:06 +0000 (22:10 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 4 Oct 2009 21:10:06 +0000 (22:10 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/architecture.rb [new file with mode: 0644]

diff --git a/facts/architecture.rb b/facts/architecture.rb
new file mode 100644 (file)
index 0000000..d6187b2
--- /dev/null
@@ -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
+