Commit cf09fe22 authored by Ángel L. Mateo's avatar Ángel L. Mateo
Browse files

Create ippool files in freerad::module::ippool

When defining an `freerad::module::ippool` this declaration also create
needed files
parent e083b91f
......@@ -17,4 +17,25 @@ define freeradius::module::ippool (
ensure => $ensure,
content => template('freeradius/ippool.erb'),
}
$_file_path = $filename =~ Stdlib::AbsolutePath ? {
true => $filename,
default => regsubst($filename, /\${db_dir}/, $freeradius::params::fr_basepath),
}
$_index_path = $ip_index =~ Stdlib::AbsolutePath ? {
true => $ip_index,
default => regsubst($ip_index, /\${db_dir}/, $freeradius::params::fr_basepath),
}
file {$_file_path:
ensure => 'present',
owner => $freeradius::params::fr_user,
group => $freeradius::params::fr_group,
mode => '0640',
}
file {$_index_path:
ensure => 'present',
owner => $freeradius::params::fr_user,
group => $freeradius::params::fr_group,
mode => '0640',
}
}
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