Skip to content

Commit

Permalink
Fixes for puppet code validation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nward committed May 6, 2021
1 parent a4f645a commit ca53e00
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 9 deletions.
7 changes: 6 additions & 1 deletion manifests/blank.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
group => $fr_group,
require => [File[$fr_basepath], Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
content => '# This file is intentionally left blank to reduce complexity. Blanking it but leaving it present is safer than deleting it, since the package manager will replace some files if they are deleted, leading to unexpected behaviour!',
content => @(BLANK/L),
# This file is intentionally left blank to reduce complexity. \
Blanking it but leaving it present is safer than deleting it, \
since the package manager will replace some files if they are \
deleted, leading to unexpected behaviour!
|-BLANK
}
}
16 changes: 15 additions & 1 deletion manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,21 @@
Optional[Enum['*', 'udp', 'tcp']] $proto = '*',
Freeradius::Boolean $require_message_authenticator = 'no',
Optional[String] $virtual_server = undef,
Optional[Enum['cisco', 'computone', 'livingston', 'juniper', 'max40xx', 'multitech', 'netserver', 'pathras', 'patton', 'portslave', 'tc', 'usrhiper', 'other']] $nastype = undef,
Optional[Enum[
'cisco',
'computone',
'livingston',
'juniper',
'max40xx',
'multitech',
'netserver',
'pathras',
'patton',
'portslave',
'tc',
'usrhiper',
'other',
]] $nastype = undef,
Optional[String] $login = undef,
Optional[String] $password = undef,
Optional[String] $coa_server = undef,
Expand Down
2 changes: 1 addition & 1 deletion manifests/home_server.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Configure a home_server for proxy config
define freeradius::home_server (
Enum['udp', 'tcp'] $proto = 'udp',
String $secret,
Enum['udp', 'tcp'] $proto = 'udp',
Enum['none', 'status-server', 'request'] $status_check = 'none',
Enum['auth', 'acct', 'auth+acct', 'coa'] $type = 'auth',
Optional[Integer] $check_interval = undef,
Expand Down
17 changes: 11 additions & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@
"log_destination value (${log_destination}) is not a valid value")

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.')
warning(@(WARN/L)
Use of the control_socket parameter in the freeradius class is deprecated. \
Please use the freeradius::control_socket class instead.
|-WARN
)
}

# Always restart the service after every module operation
Expand Down Expand Up @@ -324,12 +328,13 @@
# We don't want to create the radiusd user, just add it to the
# wbpriv group if the user needs winbind support. We depend on
# the FreeRADIUS package to be sure that the user has been created
$fr_user_group = $winbind_support ? {
true => $freeradius::fr_wbpriv_user,
default => undef,
}
user { $freeradius::fr_user:
ensure => present,
groups => $winbind_support ? {
true => $freeradius::fr_wbpriv_user,
default => undef,
},
groups => $fr_user_group,
require => Package[$freeradius::fr_package],
}

Expand All @@ -344,7 +349,7 @@
# Syslog rules
if $syslog == true {
rsyslog::snippet { '12-radiusd-log':
content => "if \$programname == \'radiusd\' then ${freeradius::fr_logpath}/radius.log\n\&\~",
content => "if \$programname == \'radiusd\' then ${freeradius::fr_logpath}/radius.log\n\\&\\~",
}
}

Expand Down
3 changes: 3 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
default => '2',
}
}
default: {
fail("OS ${::operatingsystem} is not supported")
}
}

# Use the FR version fact if defined, otherwise use our best estimate from above
Expand Down

0 comments on commit ca53e00

Please sign in to comment.