From 4366d416bc40237452ebce3e9c0ca0f02363f6c3 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 May 2016 16:40:35 +0200 Subject: [PATCH 1/2] added base group parameter --- manifests/init.pp | 1 + manifests/params.pp | 1 + templates/nslcd.erb | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 6aa8af6..0cf047a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -18,6 +18,7 @@ class nslcd ( $ldap_binddn = $nslcd::params::ldap_binddn, $ldap_bindpw = $nslcd::params::ldap_bindpw, $ldap_search_base = $nslcd::params::ldap_search_base, + $ldap_group_base = $nslcd::params::ldap_group_base, $ldap_search_scope = $nslcd::params::ldap_search_scope, $ldap_filters = $nslcd::params::ldap_filters, $ldap_ssl = $nslcd::params::ldap_ssl, diff --git a/manifests/params.pp b/manifests/params.pp index 4aca72e..1d052ba 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -12,6 +12,7 @@ class nslcd::params { $ldap_binddn = undef $ldap_bindpw = undef $ldap_search_base = '' + $ldap_group_base = '' $ldap_search_scope = 'subtree' $ldap_filters = {} $ldap_ssl = 'off' diff --git a/templates/nslcd.erb b/templates/nslcd.erb index f6fcdf1..d0a2706 100644 --- a/templates/nslcd.erb +++ b/templates/nslcd.erb @@ -15,6 +15,10 @@ ldap_version <%= @ldap_version %> # The search base that will be used for all queries. base <%= @ldap_search_base %> +<% if @ldap_group_base -%> +base group <%= @ldap_group_base -%> +<% end -%> + <% if @ldap_binddn and @ldap_bindpw -%> # The DN to bind with for normal lookups. From 7b956fc478bfc9f4c5d2d52e2a00a9bce0c05d5a Mon Sep 17 00:00:00 2001 From: Michal Rychlik Date: Wed, 27 Jul 2016 09:12:08 +0200 Subject: [PATCH 2/2] changed some params to undef instead of empty --- manifests/params.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 1d052ba..0d653ee 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -11,8 +11,8 @@ class nslcd::params { $ldap_version = '3' $ldap_binddn = undef $ldap_bindpw = undef - $ldap_search_base = '' - $ldap_group_base = '' + $ldap_search_base = undef + $ldap_group_base = undef $ldap_search_scope = 'subtree' $ldap_filters = {} $ldap_ssl = 'off'