From 13b7c9f8eeaf7574356c992494f4d7641ebdca71 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Mon, 9 Mar 2009 19:02:57 +0000 Subject: [PATCH] New set of facts to tell us about installed software Signed-off-by: Stephen Gran --- facts/software.rb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 facts/software.rb diff --git a/facts/software.rb b/facts/software.rb new file mode 100644 index 00000000..202543b4 --- /dev/null +++ b/facts/software.rb @@ -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 -- 2.39.2