blob: d8d445292a4fd0a11022ae3e10f0e76ad4ee887e (
plain)
1
2
3
4
5
6
7
8
9
10
|
Facter.add("strongswan_cert") do
setcode do
cert_path = "certs/#{Facter.value(:fqdn)}.asc"
if d = ['/etc/ipsec.d','/etc/strongswan'].find{|d| File.exists?(File.join(d,cert_path)) }
File.read(File.join(d,cert_path))
else
false
end
end
end
|