add ignoreip to jail options

This commit is contained in:
Daniel Black
2013-12-26 11:31:10 +00:00
parent a7458e33ce
commit a4b5dae912
3 changed files with 15 additions and 0 deletions
+10
View File
@@ -15,6 +15,7 @@
# Defaults to true
# $filter - The filter rule to use.
# If empty, defaults to == $jailname.
# $ignoreip - Don't ban a host which matches an address in this list.
# $port - The port to filter. It can be an array of ports.
# $logpath - The log file to monitor
# $maxretry - How many fails are acceptable
@@ -29,6 +30,7 @@ define fail2ban::jail (
$order = '',
$status = '',
$filter = '',
$ignoreip = '',
$port = '',
$action = '',
$logpath = '',
@@ -62,6 +64,14 @@ define fail2ban::jail (
default => $filter,
}
$array_ignoreip = is_array($ignoreip) ? {
false => $ignoreip ? {
'' => [],
default => [$ignoreip],
},
default => $ignoreip,
}
$array_port = is_array($port) ? {
false => $port ? {
'' => [],