Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
puppet-freeradius
Commits
b54e2fff
Commit
b54e2fff
authored
Jan 15, 2016
by
Jonathan Gazeley
Browse files
First attempt at supporting FreeRADIUS templates
parent
12fedc08
Changes
5
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
b54e2fff
...
...
@@ -26,6 +26,7 @@
*
[
`freeradius::site`
](
#freeradiussite
)
*
[
`freeradius::sql`
](
#freeradiussql
)
*
[
`freeradius::statusclient`
](
#freeradiusstatusclient
)
*
[
`freeradius::template`
](
#freeradiustemplate
)
4.
[
Limitations - OS compatibility, etc.
](
#limitations
)
5.
[
Development - Guide for contributing to the module
](
#development
)
6.
[
Release Notes
](
#release-notes
)
...
...
@@ -717,6 +718,17 @@ Default: `undef`. The UDP port that this virtual server should listen on. Leave
##### `shortname`
required. A short alias that is used in place of the IP address or fully qualified hostname provided in the first line of the section.
#### `freeradius::template`
Define template items that can be referred to in other config items
##### `source`
Provide source to a file with the template item. Specify only one of
`source`
or
`content`
.
##### `content`
Provide content of template item. Specify only one of
`source`
or
`content`
.
## Limitations
...
...
manifests/init.pp
View file @
b54e2fff
...
...
@@ -90,6 +90,20 @@ class freeradius (
order
=>
'99'
,
}
#
Set
up
concat
template
file
concat
{ "${freeradius::fr_basepath}
/
template
.
conf
"
:
owner
=>
'root'
,
group
=>
$f
reeradius
::
fr_group
,
mode
=>
'0640'
,
require
=>
[
Package
[
$f
reeradius
::
fr_package
],
Group
[
$f
reeradius
::
fr_group
]],
notify
=>
Service
[
$f
reeradius
::
fr_service
],
}
concat
::
fragment
{ 'template_header':
target => "${freeradius::fr_basepath}
/
template
.
conf
"
,
content
=>
"
#
Template
config
\
n
\
n
"
,
order
=>
'05'
,
}
#
Set
up
concat
proxy
file
concat
{ "${freeradius::fr_basepath}
/
proxy
.
conf
"
:
owner
=>
'root'
,
...
...
manifests/template.pp
0 → 100644
View file @
b54e2fff
# Configure a template snippet
define
freeradius::template
(
$source
,
$content
,
)
{
$fr_basepath
=
$::freeradius::params::fr_basepath
# Configure config fragment for this template
concat::fragment
{
"template -
${name}
"
:
target
=>
"
${fr_basepath}
/template.conf"
,
source
=>
$source
,
content
=>
$content
,
order
=>
10
,
}
}
templates/radiusd.conf.fr2.erb
View file @
b54e2fff
...
...
@@ -828,6 +828,14 @@ instantiate {
$INCLUDE instantiate/
}
######################################################################
#
# Enable support for templates
#
######################################################################
$INCLUDE templates.conf
######################################################################
#
# Policies that can be applied in multiple places are listed
...
...
templates/radiusd.conf.fr3.erb
View file @
b54e2fff
...
...
@@ -722,6 +722,12 @@ instantiate {
#}
}
######################################################################
#
# Enable support for templates
#
$INCLUDE templates.conf
######################################################################
#
# Policies are virtual modules, similar to those defined in the
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment