Commit 4dfe2ac6 authored by Jonathan's avatar Jonathan
Browse files

Merge pull request #34 from djjudas21/ldap_server_fix

LDAP multiple server fix
parents 9d6f4135 8d109909
......@@ -33,6 +33,15 @@ define freeradius::ldap (
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 = $::freeradius_version ? {
/^3\.0\./ => any2array(join($serverarray, ',')),
default => $serverarray,
}
# Fake booleans (FR uses yes/no instead of true/false)
unless $starttls in ['yes', 'no'] {
fail('$starttls must be yes or no')
......
......@@ -18,7 +18,7 @@ ldap <%= @name %> {
# - ldapi:// (LDAP over Unix socket)
# - ldapc:// (Connectionless LDAP)
#
<% @serverarray.each do |srv| -%> server = '<%= srv %>'
<% @serverconcatarray.each do |srv| -%> server = '<%= srv %>'
<% end -%>
# Port to connect on, defaults to 389, will be ignored for LDAP URIs.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment