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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Projets publics
puppet-freeradius
Commits
c710b819
Commit
c710b819
authored
8 years ago
by
Jonathan Gazeley
Browse files
Options
Downloads
Patches
Plain Diff
Provide support for virtual modules for load-balancing and failover config
parent
48391c81
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+24
-0
24 additions, 0 deletions
README.md
manifests/virtual_module.pp
+38
-0
38 additions, 0 deletions
manifests/virtual_module.pp
templates/virtual_module.erb
+5
-0
5 additions, 0 deletions
templates/virtual_module.erb
with
67 additions
and
0 deletions
README.md
+
24
−
0
View file @
c710b819
...
...
@@ -28,6 +28,7 @@
*
[
`freeradius::sql`
](
#freeradiussql
)
*
[
`freeradius::statusclient`
](
#freeradiusstatusclient
)
*
[
`freeradius::template`
](
#freeradiustemplate
)
*
[
`freeradius::virtual_module`
](
#freeradiusvirtual_module
)
4.
[
Limitations - OS compatibility, etc.
](
#limitations
)
5.
[
Development - Guide for contributing to the module
](
#development
)
6.
[
Release Notes
](
#release-notes
)
...
...
@@ -758,6 +759,29 @@ Provide source to a file with the template item. Specify only one of `source` or
Provide content of template item. Specify only one of
`source`
or
`content`
.
#### `freeradius::virtual_module`
Define a virtual module which consists of one or more other modules, for failover or
load-balancing purposes.
##### `name`
##### `submodules`
##### `type`
```
puppet
freeradius::virtual_module
{
'myldap'
:
submodules
=>
[
'ldap1'
,
'ldap2'
],
type
=>
'redundant-load-balance'
,
}
```
yields
```
redundant-load-balance myldap {
ldap1
ldap2
}
```
## Limitations
This module is targeted at FreeRADIUS 3.x running on CentOS 7. It will not work on
...
...
This diff is collapsed.
Click to expand it.
manifests/virtual_module.pp
0 → 100644
+
38
−
0
View file @
c710b819
# Define a virtual module, made up of others
define
freeradius::virtual_module
(
$submodules
,
$ensure
=
present
,
$type
=
'redundant-load-balance'
,
)
{
$fr_package
=
$::freeradius::params::fr_package
$fr_service
=
$::freeradius::params::fr_service
$fr_basepath
=
$::freeradius::params::fr_basepath
$fr_group
=
$::freeradius::params::fr_group
# Valid types of virtual module from
# http://wiki.freeradius.org/config/load-balancing
# http://wiki.freeradius.org/config/Fail-over#virtual-modules
validate_re
(
$type
,
[
'^redundant$'
,
'^load-balance$'
,
'^redundant-load-balance$'
,
'^group$'
,
])
# Make sure $submodules is a non-zero array
$submodules
=
any2array
(
$submodules
)
validate_array
(
$submodules
)
if
count
(
$submodules
)
<
1
{
fail
(
'Must specify at least one $submodule'
)
}
file
{
"
${fr_basepath}
/instantiate/
${name}
"
:
ensure
=>
$ensure
,
mode
=>
'0640'
,
owner
=>
'root'
,
group
=>
$fr_group
,
content
=>
template
(
'freeradius/virtual_module.erb'
),
require
=>
[
Package
[
$fr_package
],
Group
[
$fr_group
]],
notify
=>
Service
[
$fr_service
],
}
}
This diff is collapsed.
Click to expand it.
templates/virtual_module.erb
0 → 100644
+
5
−
0
View file @
c710b819
<%=
@type
%>
<%=
@name
%>
{
<%
@submodules
.
each
do
|
submod
|
-%>
<%=
submod
%>
<%
end
-%>
}
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