X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d0fc7974ab3e7ba959b28fe6aea2a4739e827ced..4781c23a88bfec6798e705486fc21a8923a79096:/cookbooks/fail2ban/templates/default/jail.erb diff --git a/cookbooks/fail2ban/templates/default/jail.erb b/cookbooks/fail2ban/templates/default/jail.erb index 20010d1b2..08fb7ed16 100644 --- a/cookbooks/fail2ban/templates/default/jail.erb +++ b/cookbooks/fail2ban/templates/default/jail.erb @@ -1,20 +1,13 @@ # DO NOT EDIT - This file is being maintained by Chef -[DEFAULT] -destemail = admins@openstreetmap.org -banaction = shorewall -bantime = 14400 -<% @jails.each do |jail| -%> - -[<%= jail[:name] %>] +[<%= @name %>] enabled = true -<% if jail[:protocol] -%> -protocol = <%= jail[:protocol] %> -<% end -%> -port = <%= jail[:port] %> -filter = <%= jail[:filter] %> -logpath = <%= jail[:logpath] %> -<% if jail[:maxretry] -%> -maxretry = <%= jail[:maxretry] %> +<% if @protocol -%> +protocol = <%= @protocol %> <% end -%> +port = <%= @ports.join(",") %> +filter = <%= @filter %> +logpath = <%= @logpath %> +<% if @maxretry -%> +maxretry = <%= @maxretry %> <% end -%>