mirror of
https://github.com/philippdieter/puppet-ldapquery.git
synced 2025-10-13 04:54:47 +00:00
Emit a debug message with ca_file behavior
This commit is contained in:
parent
d42bbd1c9b
commit
5669fde765
@ -52,8 +52,6 @@ module PuppetX
|
|||||||
tls = Puppet[:ldaptls]
|
tls = Puppet[:ldaptls]
|
||||||
ca_file = "#{Puppet[:confdir]}/ldap_ca.pem"
|
ca_file = "#{Puppet[:confdir]}/ldap_ca.pem"
|
||||||
|
|
||||||
# TODO: if not exists ldap_ca.pem fail
|
|
||||||
|
|
||||||
conf = {
|
conf = {
|
||||||
host: host,
|
host: host,
|
||||||
port: port
|
port: port
|
||||||
@ -72,7 +70,10 @@ module PuppetX
|
|||||||
method: :simple_tls
|
method: :simple_tls
|
||||||
}
|
}
|
||||||
if File.file?(ca_file)
|
if File.file?(ca_file)
|
||||||
|
Puppet.debug("Using #{ca_file} as CA for TLS connection")
|
||||||
conf[:encryption][:tls_options] = { ca_file: ca_file }
|
conf[:encryption][:tls_options] = { ca_file: ca_file }
|
||||||
|
else
|
||||||
|
Puppet.debug("#{ca_file} not found, using default CAs installed in your system")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user