diff options
Diffstat (limited to 'modules')
-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 |