Merge pull request #10 from MiamiOH/master
Add maps and open options to config file
This commit is contained in:
commit
3aae015036
@ -19,7 +19,9 @@ class nslcd (
|
||||
$ldap_bindpw = $nslcd::params::ldap_bindpw,
|
||||
$ldap_search_base = $nslcd::params::ldap_search_base,
|
||||
$ldap_search_scope = $nslcd::params::ldap_search_scope,
|
||||
$config_options = $nslcd::params::config_options,
|
||||
$ldap_filters = $nslcd::params::ldap_filters,
|
||||
$ldap_maps = $nslcd::params::ldap_maps,
|
||||
$ldap_ssl = $nslcd::params::ldap_ssl,
|
||||
$ldap_tls_reqcert = $nslcd::params::ldap_tls_reqcert,
|
||||
$ldap_tls_cacertfile = $nslcd::params::ldap_tls_cacertfile,
|
||||
@ -43,4 +45,3 @@ class nslcd (
|
||||
anchor { 'nslcd::end': }
|
||||
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,9 @@ class nslcd::params {
|
||||
$ldap_bindpw = undef
|
||||
$ldap_search_base = ''
|
||||
$ldap_search_scope = 'subtree'
|
||||
$config_options = {}
|
||||
$ldap_filters = {}
|
||||
$ldap_maps = {}
|
||||
$ldap_ssl = 'off'
|
||||
$ldap_tls_reqcert = 'allow'
|
||||
$ldap_tls_cacertfile = undef
|
||||
@ -49,4 +51,3 @@ class nslcd::params {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -32,9 +32,24 @@ tls_cacertfile <%= @ldap_tls_cacertfile %>
|
||||
# The search scope.
|
||||
scope <%= @ldap_search_scope %>
|
||||
|
||||
<% @config_options.sort.each do |k,v| -%>
|
||||
<% Array(v).each do |av| -%>
|
||||
<% if ![nil, '', :undef].include?(av) -%>
|
||||
<%= %Q(#{k} #{av}) %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<% if @ldap_filters.length > 0 -%>
|
||||
# Custom search filters
|
||||
<% @ldap_filters.each do |map, filter| -%>
|
||||
filter <%= map %> <%= filter %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<% if @ldap_maps.length > 0 -%>
|
||||
# Custom maps
|
||||
<% @ldap_maps.each do |key, value| -%>
|
||||
map <%= key %> <%= value %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
Loading…
Reference in New Issue
Block a user