Skip to content

Commit

Permalink
Used second trap variable to check passed trap list
Browse files Browse the repository at this point in the history
  • Loading branch information
deligatedgeek committed Nov 10, 2023
1 parent cbad6ae commit f74c32f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
String $snmp_traps_enable = 'disable',
String $snmp_traps_community = 'public',
String $snmp_traps_dest = '127.0.0.1',
Array $snmp_traps = undef,
Array $snmp_traps_list = [],
) inherits freeradius::params {
if $freeradius::fr_version !~ /^3/ {
notify { 'This module is only compatible with FreeRADIUS 3.': }
Expand Down Expand Up @@ -161,7 +161,7 @@
preserve => true,
}
}
if empty($snmp_traps) {
if empty($snmp_traps_list) {
$snmp_traps = [
'server_start',
'server_stop',
Expand All @@ -187,6 +187,8 @@
'server_sql_module_connection_fail',
'server_sql_module_hup',
]
} else {
$snmp_traps = $snmp_traps_list
}
# Add trigger.conf snmp trap configuration
file { "${freeradius::fr_basepath}/trigger.conf":
Expand Down

0 comments on commit f74c32f

Please sign in to comment.