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
f5956bd9
Commit
f5956bd9
authored
Mar 2, 2016
by
Jonathan
Browse files
Options
Downloads
Plain Diff
Merge pull request #33 from djjudas21/preserve_modules
Preserve modules
parents
26fb5079
833d5d3a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+13
-1
13 additions, 1 deletion
README.md
manifests/init.pp
+37
-11
37 additions, 11 deletions
manifests/init.pp
manifests/module.pp
+20
-9
20 additions, 9 deletions
manifests/module.pp
with
70 additions
and
21 deletions
README.md
+
13
−
1
View file @
f5956bd9
...
...
@@ -87,6 +87,9 @@ Install support for MySQL. Note this only installs the package. Use `freeradius:
##### `perl_support`
Install support for Perl. Default:
`false`
##### `preserve_mods`
Leave recommended stock modules enabled. Default:
`true`
##### `utils_support`
Install FreeRADIUS utils. Default:
`false`
...
...
@@ -467,15 +470,24 @@ Default: `allow`
#### `freeradius::module`
Install a module from a flat file.
Install a module from a flat file, or enable a stock module that came with your distribution of FreeRADIUS.
```
puppet
# Enable a stock module
freeradius::module
{
'pap'
:
preserve
=>
true
,
}
```
```
puppet
# Install a custom module from a flat file
freeradius::module
{
'buffered-sql'
:
source
=>
'puppet:///modules/site_freeradius/buffered-sql'
,
}
```
```
puppet
# Install a custom module from a template
freeradius::module
{
'buffered-sql'
:
content
=>
template
(
'some_template.erb)'
,
}
...
...
This diff is collapsed.
Click to expand it.
manifests/init.pp
+
37
−
11
View file @
f5956bd9
...
...
@@ -10,6 +10,7 @@ class freeradius (
$wpa_supplicant
=
false
,
$winbind_support
=
false
,
$syslog
=
false
,
$preserve_mods
=
true
,
)
inherits
freeradius::params
{
if
(
$freeradius::fr_version
!=
3
)
{
...
...
@@ -55,6 +56,7 @@ class freeradius (
"
${freeradius::fr_basepath}
/certs"
,
"
${freeradius::fr_basepath}
/clients.d"
,
"
${freeradius::fr_basepath}
/sites-enabled"
,
"
${freeradius::fr_basepath}
/mods-enabled"
,
"
${freeradius::fr_basepath}
/instantiate"
,
]:
ensure
=>
directory
,
...
...
@@ -67,12 +69,43 @@ class freeradius (
notify
=>
Service
[
$freeradius::fr_service
],
}
# Delete some modules which come bundled with the server that we
# know break functionality out of the box with this config
freeradius::module
{
'eap'
:
ensure
=>
absent
,
# Preserve some stock modules
if
(
$preserve_mods
)
{
freeradius::module
{
[
'always'
,
'cache_eap'
,
'chap'
,
'detail'
,
'detail.log'
,
'dhcp'
,
'digest'
,
'dynamic_clients'
,
'echo'
,
'exec'
,
'expiration'
,
'expr'
,
'files'
,
'linelog'
,
'logintime'
,
'mschap'
,
'ntlm_auth'
,
'pap'
,
'passwd'
,
'preprocess'
,
'radutmp'
,
'realm'
,
'replicate'
,
'soh'
,
'sradutmp'
,
'unix'
,
'unpack'
,
'utf8'
,
]:
preserve
=>
true
,
}
}
# Set up concat policy file, as there is only one global policy
# We also add standard header and footer
concat
{
"
${freeradius::fr_basepath}
/policy.conf"
:
...
...
@@ -225,13 +258,6 @@ class freeradius (
require
=>
Package
[
$freeradius::fr_package
]
}
# Install a few modules required on all FR installations
# No content is specified, so we accept the package manager default
# Defining them here prevents them from being purged
freeradius::module
{
'always'
:
}
freeradius::module
{
'detail'
:
}
freeradius::module
{
'detail.log'
:
}
# Syslog rules
if
$syslog
==
true
{
rsyslog::snippet
{
'12-radiusd-log'
:
...
...
This diff is collapsed.
Click to expand it.
manifests/module.pp
+
20
−
9
View file @
f5956bd9
...
...
@@ -3,12 +3,22 @@ define freeradius::module (
$source
=
undef
,
$content
=
undef
,
$ensure
=
present
,
$preserve
=
false
,
)
{
$fr_package
=
$::freeradius::params::fr_package
$fr_service
=
$::freeradius::params::fr_service
$fr_modulepath
=
$::freeradius::params::fr_modulepath
$fr_basepath
=
$::freeradius::params::fr_basepath
$fr_group
=
$::freeradius::params::fr_group
if
(
$preserve
)
{
# Symlink to mods-available for stock modules
file
{
"
${fr_modulepath}
/
${name}
"
:
ensure
=>
link
,
target
=>
"../mods-available/
${name}
"
,
}
}
else
{
# Deploy actual module to sites-enabled
file
{
"
${fr_modulepath}
/
${name}
"
:
ensure
=>
$ensure
,
mode
=>
'0640'
,
...
...
@@ -20,3 +30,4 @@ define freeradius::module (
notify
=>
Service
[
$fr_service
],
}
}
}
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