Commit dc98ae95 authored by Jonathan Gazeley's avatar Jonathan Gazeley
Browse files

Template mod config dir for FR2 and FR3

parent 12812cea
......@@ -4,19 +4,19 @@ define freeradius::config (
$content = undef,
$ensure = present,
) {
$fr_package = $::freeradius::params::fr_package
$fr_service = $::freeradius::params::fr_service
$fr_basepath = $::freeradius::params::fr_basepath
$fr_group = $::freeradius::params::fr_group
$fr_package = $::freeradius::params::fr_package
$fr_service = $::freeradius::params::fr_service
$fr_group = $::freeradius::params::fr_group
$fr_moduleconfigpath = $::freeradius::params::fr_moduleconfigpath
file { "${fr_basepath}/conf.d/${name}":
file { "${fr_moduleconfigpath}/${name}":
ensure => $ensure,
mode => '0640',
owner => 'root',
group => $fr_group,
source => $source,
content => $content,
require => [File["${fr_basepath}/conf.d"], Package[$fr_package], Group[$fr_group]],
require => [File[$fr_moduleconfigpath], Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
}
}
......@@ -46,6 +46,16 @@ class freeradius::params {
# Default module path
$fr_modulepath = "${fr_basepath}/${fr_moduledir}"
# Default module config dir
$fr_modconfigdir = $::freeradius_version ? {
/^2\./ => 'conf.d',
/^3\./ => 'mods-config',
default => 'conf.d',
}
# Default module config path
$fr_moduleconfigpath = "${fr_basepath}/${fr_modconfigdir}"
# Path for FreeRADIUS logs
$fr_logpath = $::osfamily ? {
'RedHat' => '/var/log/radius',
......
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