Commit e053999e authored by Jonathan's avatar Jonathan
Browse files

Merge pull request #16 from diranged/misc_improvements

Allow for 'content' to be passed into freeradius::config and freeradius::cert
parents cf6b9c5c 9f07dee6
......@@ -148,6 +148,13 @@ freeradius::cert { 'mycert.pem':
}
```
```puppet
freeradius::cert { 'mycert.pem':
content => '<your key/cert content here>',
type => 'key',
}
```
##### `type`
Set file permissions on the installed certificate differently depending on whether this is a private key or a public certificate. Note that the default is to treat the file as a private key and remove world-readable privileges. Allowable values: `cert`, `key`. Default: `key`.
......@@ -204,6 +211,12 @@ freeradius::config { 'realm-checks.conf':
}
```
```puppet
freeradius::config { 'realm-checks.conf':
content => template('your_template),
}
```
#### `freeradius::dictionary`
Install custom dictionaries without breaking the default FreeRADIUS dictionary. Custom dictionaries are installed in `/etc/raddb/dictionary.d` and automatically included in the global dictionary.
......
# Install FreeRADIUS certificates
define freeradius::cert (
$source,
$source = undef,
$content = undef,
$type = 'key',
$ensure = present,
) {
......@@ -16,12 +17,14 @@ define freeradius::cert (
}
file { "${fr_basepath}/certs/${name}":
ensure => $ensure,
mode => $permission,
owner => 'root',
group => $fr_group,
source => $source,
require => [File["${fr_basepath}/certs"], Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
ensure => $ensure,
mode => $permission,
owner => 'root',
group => $fr_group,
source => $source,
content => $content,
show_diff => false,
require => [File["${fr_basepath}/certs"], Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
}
}
# Install FreeRADIUS config snippets
define freeradius::config (
$source,
$source = undef,
$content = undef,
$ensure = present,
) {
$fr_package = $::freeradius::params::fr_package
......@@ -14,6 +15,7 @@ define freeradius::config (
owner => 'root',
group => $fr_group,
source => $source,
content => $content,
require => [File["${fr_basepath}/conf.d"], Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
}
......
......@@ -67,7 +67,7 @@ raddbdir = ${sysconfdir}/raddb
radacctdir = ${logdir}/radacct
# name of the running server. See also the "-n" command-line option.
name = radiusd
name = <%= @fr_service %>
# Location of config and logfiles.
confdir = ${raddbdir}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment