Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
puppet-freeradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Projets publics
puppet-freeradius
Commits
ede1a1a7
Commit
ede1a1a7
authored
May 4, 2016
by
Jonathan Gazeley
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
manifests/ldap.pp
+9
-0
9 additions, 0 deletions
manifests/ldap.pp
templates/ldap.erb
+1
-1
1 addition, 1 deletion
templates/ldap.erb
with
10 additions
and
1 deletion
manifests/ldap.pp
+
9
−
0
View file @
ede1a1a7
...
@@ -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'
)
...
...
This diff is collapsed.
Click to expand it.
templates/ldap.erb
+
1
−
1
View file @
ede1a1a7
...
@@ -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
%>
'
<%
@server
concat
array
.
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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment