From: Tom Hughes Date: Sat, 12 Oct 2019 14:49:19 +0000 (+0100) Subject: Make more fail2ban jail properties optional X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/4fdccfca6722a18f88bdcaa909d19d894b4483ba Make more fail2ban jail properties optional --- 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 -%>