Skip to content
Snippets Groups Projects
Commit ede1a1a7 authored by Jonathan Gazeley's avatar Jonathan Gazeley
Browse files

Allow different LDAP config methods for 3.0 and 3.1

parent 73ea9298
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,15 @@ define freeradius::ldap ( ...@@ -33,6 +33,15 @@ define freeradius::ldap (
fail('$server must be an array of hostnames or IP addresses') fail('$server must be an array of hostnames or IP addresses')
} }
# FR3.0 format server = 'ldap1.example.com, ldap1.example.com, ldap1.example.com'
# FR3.1 format server = 'ldap1.example.com'
# server = 'ldap2.example.com'
# server = 'ldap3.example.com'
$serverconcatarray = $::freeradiusversion ? {
/^3\.0\./ => join($serverarray, ','),
default => $serverarray,
}
# Fake booleans (FR uses yes/no instead of true/false) # Fake booleans (FR uses yes/no instead of true/false)
unless $starttls in ['yes', 'no'] { unless $starttls in ['yes', 'no'] {
fail('$starttls must be yes or no') fail('$starttls must be yes or no')
......
...@@ -18,7 +18,7 @@ ldap <%= @name %> { ...@@ -18,7 +18,7 @@ ldap <%= @name %> {
# - ldapi:// (LDAP over Unix socket) # - ldapi:// (LDAP over Unix socket)
# - ldapc:// (Connectionless LDAP) # - ldapc:// (Connectionless LDAP)
# #
<% @serverarray.each do |srv| -%> server = '<%= srv %>' <% @serverconcatarray.each do |srv| -%> server = '<%= srv %>'
<% end -%> <% end -%>
# Port to connect on, defaults to 389, will be ignored for LDAP URIs. # Port to connect on, defaults to 389, will be ignored for LDAP URIs.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment