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
ca24df07
Commit
ca24df07
authored
10 years ago
by
Jonathan Gazeley
Browse files
Options
Downloads
Patches
Plain Diff
First pass support for native SQL connections
parent
6833798e
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
README.md
+38
-1
38 additions, 1 deletion
README.md
manifests/sql.pp
+29
-0
29 additions, 0 deletions
manifests/sql.pp
with
67 additions
and
1 deletion
README.md
+
38
−
1
View file @
ca24df07
...
...
@@ -65,7 +65,7 @@ The maximum number of requests which the server keeps track of. This should be 2
Limit on the total number of servers running. Default:
`4096`
##### `mysql_support`
Install support for MySQL. Default:
`false`
Install support for MySQL.
Note this only installs the package. Use
`freeradius::sql`
to configure SQL support.
Default:
`false`
##### `perl_support`
Install support for Perl. Default:
`false`
...
...
@@ -238,6 +238,43 @@ freeradius::site { 'inner-tunnel':
}
```
#### `freeradius::sql`
Configure SQL connections. You can define multiple database connections by
invoking this resource multiple times. If you are using MySQL, don't forget to
also set
`mysql_support => true`
in the base
`freeradius`
class.
##### `database`
Default:
`undef`
. Required. Specify which FreeRADIUS database driver to use. Choose one of
`mysql`
,
`mssql`
,
`oracle`
,
`postgresql`
##### `server`
Default:
`localhost`
. Specify hostname of IP address of the database server.
##### `login`
Default:
`radius`
. Username to connect to the databae.
##### `password`
Default:
`undef`
. Required. Password to connect to the database.
##### `radius_db`
Default:
`radius`
. Name of the database. Normally you should leave this alone. If you are using Oracle then use this instead:
`(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=your_sid)))`
.
```
puppet
freeradius::sql
{
'mydatabase'
:
database
=>
'mysql'
,
server
=>
'192.168.0.1'
,
login
=>
'radius'
,
password
=>
'topsecret'
,
radius_db
=>
'radius'
,
}
```
#### `freeradius::statusclient`
Define RADIUS clients, specifically to connect to the status server for monitoring.
...
...
This diff is collapsed.
Click to expand it.
manifests/sql.pp
0 → 100644
+
29
−
0
View file @
ca24df07
# Configure SQL support for FreeRADIUS
define
freeradius::sql
(
$database
,
$password
,
$server
=
'localhost'
,
$login
=
'radius'
,
$radius_db
=
'radius'
,
)
{
$fr_package
=
$::freeradius::params::fr_package
$fr_service
=
$::freeradius::params::fr_service
$fr_basepath
=
$::freeradius::params::fr_basepath
$fr_group
=
$::freeradius::params::fr_group
# Validate our inputs
if
(
$database
!=
'mysql'
and
$database
!=
'mssql'
and
$database
!=
'oracle'
and
$database
!=
'postgresql'
)
{
error
(
'$database must be one of mysql, mssql, oracle, postgresql'
)
}
# Generate a module config, based on sql.conf
file
{
"
${fr_basepath}
/modules/
${name}
"
:
mode
=>
'0640'
,
owner
=>
'root'
,
group
=>
$fr_group
,
content
=>
template
(
'freeradius/sql.conf.erb'
),
require
=>
[
Package
[
$fr_package
],
Group
[
$fr_group
]],
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