From d834848967983004ca1c8029b6f086f078629ef1 Mon Sep 17 00:00:00 2001 From: tohe Date: Tue, 25 Aug 2020 14:35:41 +0200 Subject: [PATCH] Configurable server_url for ldap server --- manifests/lam.pp | 8 ++++++-- templates/wmde.conf.erb | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/manifests/lam.pp b/manifests/lam.pp index 2cede2e..0063bb9 100644 --- a/manifests/lam.pp +++ b/manifests/lam.pp @@ -125,8 +125,10 @@ class wmdeit_ldap::lam( default => $spw }, - - + server_url => $conf['server_url'] ? { + undef => "", + default => 'ldap://localhost:389' + }, } } @@ -147,6 +149,8 @@ define wmdeit_ldap::lam::config $login_search_dn = "", $login_search_filter = "", $login_search_password = "", + $server_url , + ){ if (!$suffix_user) or (!$suffix_group) { diff --git a/templates/wmde.conf.erb b/templates/wmde.conf.erb index 678d96b..18f4b1c 100644 --- a/templates/wmde.conf.erb +++ b/templates/wmde.conf.erb @@ -5,7 +5,7 @@ ################################################################################################### # server address (e.g. ldap://localhost:389 or ldaps://localhost:636) -ServerURL: ldap://localhost:389 +ServerURL: <%= @server_url %> # list of users who are allowed to use LDAP Account Manager # names have to be seperated by semicolons