OSDN Git Service

improves CA certificates and server key pair deployment.
[metasearch/grid-chef-repo.git] / cookbooks / openldap-grid / recipes / client.rb
index e42483c..2dd0076 100644 (file)
@@ -2,7 +2,7 @@
 # Cookbook Name:: openldap-grid
 # Recipe:: client
 #
-# Copyright 2013-2016, whitestar
+# Copyright 2013-2018, whitestar
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -53,6 +53,13 @@ tls_cacert = node['openldap']['client']['TLS_CACERT']
 if node['openldap']['with_ssl_cert_cookbook'] \
   && (tls_cacert.nil? || tls_cacert.empty?)
   ::Chef::Recipe.send(:include, SSLCert::Helper)
+
+  ca_name = node['openldap']['ssl_cert']['ca_name']
+  unless ca_name.nil?
+    append_ca_name(ca_name)
+    include_recipe 'ssl_cert::ca_certs'
+  end
+
   node.force_override['openldap']['client']['TLS_CACERT'] \
     = ca_cert_path(node['openldap']['ssl_cert']['ca_name'])
 end