puppet-nslcd/templates/nslcd.erb

79 lines
1.8 KiB
Plaintext

### FILE MANAGED BY PUPPET
### DO NOT EDIT
# 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(' ') %>
# The LDAP protocol version to use.
ldap_version <%= @ldap_version %>
<% if @ldap_search_base -%>
# The search base that will be used for all queries.
base <%= @ldap_search_base %>
<% end -%>
<% if @ldap_group_base -%>
# The group search base that will be used for all queries.
base group <%= @ldap_group_base %>
<% end -%>
<% if @ldap_binddn and @ldap_bindpw -%>
# The DN to bind with the LDAP server.
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
<% @ldap_filters.sort.each do |map, filter| -%>
filter <%= map %> <%= filter %>
<% end -%>
<% end -%>
<% if @ldap_maps.length > 0 -%>
# Custom maps
<% @ldap_maps.sort.each do |map, attributes| -%>
<% attributes.sort.each do |attribute, newattribute| -%>
map <%= map %> <%= attribute %> <%= newattribute %>
<% end -%>
<% end -%>
<% end -%>
# 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 -%>