Commit 60c6ad3a authored by Jonathan's avatar Jonathan Committed by GitHub
Browse files

Merge pull request #36 from ross-w/rw_fix_puppet4

Fix compatibility with strict variable checking and version comparison on Puppet 4
parents ba3ccd00 a34dc5f9
......@@ -13,9 +13,7 @@ class freeradius (
$preserve_mods = true,
) inherits freeradius::params {
if ($freeradius::fr_version != 3) {
fail('This module is only compatible with FreeRADIUS 3')
}
validate_re($freeradius::fr_version, '^3', 'This module is only compatible with FreeRADIUS 3')
if $control_socket == true {
warning('Use of the control_socket parameter in the freeradius class is deprecated. Please use the freeradius::control_socket class instead.')
......
......@@ -39,7 +39,7 @@ class freeradius::params {
}
# Use the FR version fact if defined, otherwise use our best estimate from above
if $::freeradius_maj_version {
if getvar('::freeradius_maj_version') {
$fr_version = $::freeradius_maj_version
} else {
$fr_version = $fr_guessversion
......
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