2018-09-06 04:43:54 -04:00
|
|
|
### FILE MANAGED BY PUPPET
|
|
|
|
### DO NOT EDIT
|
2015-04-16 18:04:30 -04:00
|
|
|
# module: 'nslcd'
|
|
|
|
|
|
|
|
# The user and group nslcd should run as.
|
|
|
|
uid <%= @uid %>
|
|
|
|
gid <%= @gid %>
|
|
|
|
|
|
|
|
# The location at which the LDAP server(s) should be reachable.
|
2016-07-11 08:22:07 -04:00
|
|
|
uri <%= @ldap_uris.sort.join(' ') %>
|
2015-04-16 18:04:30 -04:00
|
|
|
|
|
|
|
# The LDAP protocol version to use.
|
|
|
|
ldap_version <%= @ldap_version %>
|
|
|
|
|
2021-11-06 07:36:59 -04:00
|
|
|
<% if @ldap_search_base -%>
|
2015-04-16 18:04:30 -04:00
|
|
|
# The search base that will be used for all queries.
|
|
|
|
base <%= @ldap_search_base %>
|
2016-05-09 10:40:35 -04:00
|
|
|
<% end -%>
|
|
|
|
|
2021-11-06 07:36:59 -04:00
|
|
|
<% if @ldap_group_base -%>
|
|
|
|
# The group search base that will be used for all queries.
|
|
|
|
base group <%= @ldap_group_base %>
|
|
|
|
<% end -%>
|
2015-04-16 18:04:30 -04:00
|
|
|
|
|
|
|
<% if @ldap_binddn and @ldap_bindpw -%>
|
2021-11-06 07:36:59 -04:00
|
|
|
# The DN to bind with the LDAP server.
|
2015-04-16 18:04:30 -04:00
|
|
|
binddn <%= @ldap_binddn %>
|
|
|
|
bindpw <%= @ldap_bindpw %>
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
# SSL options
|
|
|
|
ssl <%= @ldap_ssl %>
|
|
|
|
tls_reqcert <%= @ldap_tls_reqcert %>
|
|
|
|
<% if @ldap_tls_cacertfile -%>
|
|
|
|
tls_cacertfile <%= @ldap_tls_cacertfile %>
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
# The search scope.
|
|
|
|
scope <%= @ldap_search_scope %>
|
|
|
|
|
|
|
|
<% if @ldap_filters.length > 0 -%>
|
|
|
|
# Custom search filters
|
2016-07-11 08:17:46 -04:00
|
|
|
<% @ldap_filters.sort.each do |map, filter| -%>
|
2015-04-16 18:04:30 -04:00
|
|
|
filter <%= map %> <%= filter %>
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
2016-06-17 11:33:11 -04:00
|
|
|
|
|
|
|
<% if @ldap_maps.length > 0 -%>
|
|
|
|
# Custom maps
|
2016-07-12 08:50:44 -04:00
|
|
|
<% @ldap_maps.sort.each do |map, attributes| -%>
|
|
|
|
<% attributes.sort.each do |attribute, newattribute| -%>
|
2016-05-10 13:58:58 -04:00
|
|
|
map <%= map %> <%= attribute %> <%= newattribute %>
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
2016-06-17 11:33:11 -04:00
|
|
|
<% end -%>
|
2021-11-06 07:36:59 -04:00
|
|
|
|
|
|
|
# Timeouts
|
|
|
|
<% if @bind_timelimit -%>
|
|
|
|
bind_timelimit <%= @bind_timelimit %>
|
|
|
|
<% end -%>
|
|
|
|
timelimit <%= @timelimit %>
|
|
|
|
<% if @idle_timelimit -%>
|
|
|
|
idle_timelimit <%= @idle_timelimit %>
|
|
|
|
<% end -%>
|
|
|
|
reconnect_sleeptime <%= @reconnect_sleeptime %>
|
|
|
|
reconnect_retrytime <%= @reconnect_retrytime %>
|
|
|
|
|
|
|
|
<% if @config_options.length > 0 -%>
|
|
|
|
# Extended configuration
|
|
|
|
<% @config_options.sort.each do |k,v| -%>
|
|
|
|
<% Array(v).each do |av| -%>
|
|
|
|
<% if ![nil, '', :undef].include?(av) -%>
|
|
|
|
<%= %Q(#{k} #{av}) %>
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
|
|
|
|