diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-02-26 13:46:44 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-02-26 13:46:44 +0000 |
commit | a6963579834ef587b6a3fd4c8c5d2862161d2776 (patch) | |
tree | 61ad8bc9f4de369e168e466dee765ff0e6f5c6ce /modules/facter | |
parent | 12669ecb3b3cbedc01757100b3ef750d1e556778 (diff) | |
download | puppet-a6963579834ef587b6a3fd4c8c5d2862161d2776.tar puppet-a6963579834ef587b6a3fd4c8c5d2862161d2776.tar.gz puppet-a6963579834ef587b6a3fd4c8c5d2862161d2776.tar.bz2 puppet-a6963579834ef587b6a3fd4c8c5d2862161d2776.tar.xz puppet-a6963579834ef587b6a3fd4c8c5d2862161d2776.zip |
add fact to check if wildcard certificate is installed
Diffstat (limited to 'modules/facter')
-rw-r--r-- | modules/facter/lib/facter/wildcard_sslcert.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/facter/lib/facter/wildcard_sslcert.rb b/modules/facter/lib/facter/wildcard_sslcert.rb new file mode 100644 index 00000000..07f762d3 --- /dev/null +++ b/modules/facter/lib/facter/wildcard_sslcert.rb @@ -0,0 +1,16 @@ +Facter.add("wildcard_sslcert") do + setcode do + begin + Facter.domain + rescue + Facter.loadfacts() + end + sslfiles = '/etc/ssl/wildcard.' + Facter.value('domain') + if File.exist?(sslfiles + '.crt') and File.exist?(sslfiles + '.key') \ + and File.exist?(sslfiles + '.pem') + 'yes' + else + 'no' + end + end +end |