From 4fdccfca6722a18f88bdcaa909d19d894b4483ba Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 12 Oct 2019 15:49:19 +0100 Subject: [PATCH] Make more fail2ban jail properties optional --- cookbooks/fail2ban/templates/default/jail.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cookbooks/fail2ban/templates/default/jail.erb b/cookbooks/fail2ban/templates/default/jail.erb index a5cdd4895..91978488c 100644 --- a/cookbooks/fail2ban/templates/default/jail.erb +++ b/cookbooks/fail2ban/templates/default/jail.erb @@ -5,9 +5,15 @@ enabled = true <% if @protocol -%> protocol = <%= @protocol %> <% end -%> +<% if @ports -%> port = <%= @ports.join(",") %> +<% end -%> +<% if @filter -%> filter = <%= @filter %> +<% end -%> +<% if @logpath -%> logpath = <%= @logpath %> +<% end -%> <% if @maxretry -%> maxretry = <%= @maxretry %> <% end -%> -- 2.43.2