From 5669fde765b1eecb5b696b3d4ac5210f17f8eda3 Mon Sep 17 00:00:00 2001 From: Victor Cabezas Date: Mon, 20 Apr 2020 10:33:03 +0200 Subject: [PATCH] Emit a debug message with ca_file behavior --- lib/puppet_x/ldapquery.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/puppet_x/ldapquery.rb b/lib/puppet_x/ldapquery.rb index 2cf88f7..6cbe3b9 100644 --- a/lib/puppet_x/ldapquery.rb +++ b/lib/puppet_x/ldapquery.rb @@ -52,8 +52,6 @@ module PuppetX tls = Puppet[:ldaptls] ca_file = "#{Puppet[:confdir]}/ldap_ca.pem" - # TODO: if not exists ldap_ca.pem fail - conf = { host: host, port: port @@ -72,7 +70,10 @@ module PuppetX method: :simple_tls } if File.file?(ca_file) + Puppet.debug("Using #{ca_file} as CA for TLS connection") conf[:encryption][:tls_options] = { ca_file: ca_file } + else + Puppet.debug("#{ca_file} not found, using default CAs installed in your system") end end