Commit 348571a7 authored by Angel L. Mateo's avatar Angel L. Mateo
Browse files

Fix link in absent modules

The link in mods-enabled directory should not be present is module has
`ensure => absent`
parent f0ef6cc0
......@@ -11,10 +11,15 @@ define freeradius::module (
$fr_basepath = $::freeradius::params::fr_basepath
$fr_group = $::freeradius::params::fr_group
$ensure_link = $ensure ? {
'absent' => 'absent',
default => 'link'
}
if ($preserve) {
# Symlink to mods-available for stock modules
file { "${fr_modulepath}/${name}":
ensure => link,
ensure => $ensure_link,
target => "../mods-available/${name}",
}
} else {
......@@ -30,7 +35,7 @@ define freeradius::module (
notify => Service[$fr_service],
}
file { "${fr_modulepath}/${name}":
ensure => link,
ensure => $ensure_link,
target => "../mods-available/${name}",
}
}
......
Markdown is supported
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