puppet-nslcd/templates/nslcd.erb

61 lines
1.3 KiB
Plaintext
Raw Normal View History

2015-04-16 18:04:30 -04:00
# This file is being managed by puppet
# 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.
uri <%= @ldap_uris.sort.join(' ') %>
2015-04-16 18:04:30 -04:00
# The LDAP protocol version to use.
ldap_version <%= @ldap_version %>
# The search base that will be used for all queries.
base <%= @ldap_search_base %>
<% if @ldap_binddn and @ldap_bindpw -%>
# The DN to bind with for normal lookups.
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 %>
2016-06-17 11:43:47 -04:00
<% @config_options.sort.each do |k,v| -%>
<% Array(v).each do |av| -%>
<% if ![nil, '', :undef].include?(av) -%>
<%= %Q(#{k} #{av}) %>
<% end -%>
<% end -%>
<% end -%>
2015-04-16 18:04:30 -04:00
<% if @ldap_filters.length > 0 -%>
# Custom search filters
<% @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
<% @ldap_maps.sort.each do |key, value| -%>
2016-06-17 11:33:11 -04:00
map <%= key %> <%= value %>
<% end -%>
<% end -%>
2017-03-21 12:20:00 -04:00
<% if @ldap_options.length > 0 -%>
# Additional options
<% @ldap_options.each do |name, value| -%>
<%= name %> <%= value %>
<% end -%>
<% end -%>