aboutsummaryrefslogtreecommitdiffstats
path: root/modules/facter/lib/facter/wildcard_sslcert.rb
blob: 093982d974a1e986200da385c9e85b97dbe6aa89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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')
                        'true'
                else
                        'false'
                end
        end
end