From fe3844ebe869a4d2bf14a565614a6fd1c78ad234 Mon Sep 17 00:00:00 2001 From: Ryan Struber Date: Tue, 21 Mar 2017 12:20:00 -0400 Subject: [PATCH] Add generic options to nslcd template --- manifests/init.pp | 1 + manifests/params.pp | 1 + templates/nslcd.erb | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 9ac6a41..49d0b47 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -27,6 +27,7 @@ class nslcd ( $ldap_ssl = $nslcd::params::ldap_ssl, $ldap_tls_reqcert = $nslcd::params::ldap_tls_reqcert, $ldap_tls_cacertfile = $nslcd::params::ldap_tls_cacertfile, + $ldap_options = $nslcd::params::ldap_options, ) inherits nslcd::params { # Input validation diff --git a/manifests/params.pp b/manifests/params.pp index fc61ce3..27f071e 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -21,6 +21,7 @@ class nslcd::params { $ldap_ssl = 'off' $ldap_tls_reqcert = 'allow' $ldap_tls_cacertfile = undef + $ldap_options = {} $default_config = '/etc/nslcd.conf' $default_package_name = 'nslcd' diff --git a/templates/nslcd.erb b/templates/nslcd.erb index 3c53008..9e78009 100644 --- a/templates/nslcd.erb +++ b/templates/nslcd.erb @@ -51,4 +51,10 @@ filter <%= map %> <%= filter %> map <%= key %> <%= value %> <% end -%> <% end -%> + +<% if @ldap_options.length > 0 -%> +# Additional options +<% @ldap_options.each do |name, value| -%> +<%= name %> <%= value %> +<% end -%> <% end -%>