]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
New set of facts to tell us about installed software
authorStephen Gran <steve@lobefin.net>
Mon, 9 Mar 2009 19:02:57 +0000 (19:02 +0000)
committerStephen Gran <steve@lobefin.net>
Mon, 9 Mar 2009 19:02:57 +0000 (19:02 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
facts/software.rb [new file with mode: 0644]

diff --git a/facts/software.rb b/facts/software.rb
new file mode 100644 (file)
index 0000000..202543b
--- /dev/null
@@ -0,0 +1,30 @@
+Facter.add("apache2") do
+       setcode do
+               FileTest.exist?("/usr/sbin/apache2")
+       end
+end
+Facter.add("clamd") do
+       setcode do
+               FileTest.exist?("/usr/sbin/clamd")
+       end
+end
+Facter.add("exim4") do
+       setcode do
+               FileTest.exist?("/usr/sbin/exim4")
+       end
+end
+Facter.add("postfix") do
+       setcode do
+               FileTest.exist?("/usr/sbin/postfix")
+       end
+end
+Facter.add("postgres81") do
+       setcode do
+               FileTest.exist?("/usr/lib/postgresql/8.1/bin/postgres")
+       end
+end
+Facter.add("postgres83") do
+       setcode do
+               FileTest.exist?("/usr/lib/postgresql/8.3/bin/postgres")
+       end
+end