akester/new-chef

Fork Project

92874caa17bd874509d8fea54024ccb09199f21c

Authored By: Andrew Kester Date: November 11, 2017 9:59 am

Update NSS config for NSLCD.

This is the replacement package for libnss-ldap, and was automatically configured during past migrations but on new hosts was not setup correctly.

cookbooks/sthse/recipes/ldap.rb
76 76
 end
77 77
 
78 78
 # Add LDAP specific config
79
-template '/etc/libnss-ldap.conf' do
80
-	source 'ldap/libnss-ldap.conf.erb'
81
-	notifies :restart, 'service[nscd]', :delayed
82
-	mode 0644
83
-	owner 'root'
84
-	group 'root'
85
-	variables(file_vars)
79
+file '/etc/libnss-ldap.conf' do
80
+	action :delete
81 86
 end
87
-template '/etc/libnss-ldap.secret' do
88
-	source 'ldap/libnss-ldap.secret.erb'
89
-	notifies :restart, 'service[nscd]', :delayed
90
-	mode 0600
82
+file '/etc/libnss-ldap.secret' do
83
+	action :delete
84
+end
85
+template '/etc/nslcd.conf' do
86
+	source 'ldap/nslcd.conf.erb'
87
+	notifies :restart, 'service[nslcd]', :delayed
88
+	mode 0644
89 91
 	owner 'root'
90 92
 	group 'root'
91 93
 	variables(file_vars)
114 112
 	supports :status => true
115 113
 	action [:nothing]
116 114
 end
117
+service 'nslcd' do
118
+	supports :status => true
119
+	action [:nothing]
120
+end
cookbooks/sthse/templates/ldap/nslcd.conf.erb

cookbooks/sthse/templates/ldap/nslcd.conf.erb was modified.