Another shot at this facts thing
authorStephen Gran <steve@lobefin.net>
Sat, 28 Feb 2009 19:25:12 +0000 (19:25 +0000)
committerStephen Gran <steve@lobefin.net>
Sat, 28 Feb 2009 19:25:12 +0000 (19:25 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/raidcontroller.rb [new file with mode: 0644]
fileserver.conf
plugins/facter/raidcontroller.rb [deleted file]

diff --git a/facts/raidcontroller.rb b/facts/raidcontroller.rb
new file mode 100644 (file)
index 0000000..5ec322a
--- /dev/null
@@ -0,0 +1,15 @@
+Facter.add("raidcontroller") do
+        confine :kernel => :linux
+        ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
+        setcode do
+                controllers = []
+                lspciexists = system "/bin/bash -c 'which lspci >&/dev//null'"
+                if $?.exitstatus == 0
+                        output = %x{lspci}
+                        output.each { |s|
+                                controllers.push($1) if s =~ /RAID bus controller: (.*)/
+                        }
+                end
+                controllers
+        end
+end
index dfb950b..8aab99c 100644 (file)
@@ -15,3 +15,6 @@
 #  allow *.example.com
 #  deny *.evil.example.com
 #  allow 192.168.0.0/24
+[facts]
+   path /etc/puppet/facts
+
diff --git a/plugins/facter/raidcontroller.rb b/plugins/facter/raidcontroller.rb
deleted file mode 100644 (file)
index 5ec322a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-Facter.add("raidcontroller") do
-        confine :kernel => :linux
-        ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
-        setcode do
-                controllers = []
-                lspciexists = system "/bin/bash -c 'which lspci >&/dev//null'"
-                if $?.exitstatus == 0
-                        output = %x{lspci}
-                        output.each { |s|
-                                controllers.push($1) if s =~ /RAID bus controller: (.*)/
-                        }
-                end
-                controllers
-        end
-end