From 38e4b25e29bf2d8e7cec3af7ec0f27ff86104c4c Mon Sep 17 00:00:00 2001 From: Victor Cabezas Date: Thu, 16 Apr 2020 18:19:37 +0200 Subject: [PATCH] Check for CA file existence --- lib/puppet_x/ldapquery.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/puppet_x/ldapquery.rb b/lib/puppet_x/ldapquery.rb index c919baf..e6cb24a 100644 --- a/lib/puppet_x/ldapquery.rb +++ b/lib/puppet_x/ldapquery.rb @@ -72,6 +72,9 @@ module PuppetX method: :simple_tls, tls_options: { ca_file: ca_file } } + if File.file?(ca_file) + conf[:encryption][:tls_options] = { ca_file: ca_file } + end end conf