X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/722833be07c07adb4b487e1c57fb98b31c4c30f3..5188a8f5887ab9ec2f08a7a3acf53aad22f38c77:/cookbooks/fail2ban/templates/default/jail.erb?ds=inline diff --git a/cookbooks/fail2ban/templates/default/jail.erb b/cookbooks/fail2ban/templates/default/jail.erb index 20010d1b2..357e09ea5 100644 --- a/cookbooks/fail2ban/templates/default/jail.erb +++ b/cookbooks/fail2ban/templates/default/jail.erb @@ -1,20 +1,34 @@ # 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] %> +<% if @protocol -%> +protocol = <%= @protocol %> +<% end -%> +<% if @ports -%> +port = <%= @ports.join(",") %> +<% end -%> +<% if @filter -%> +filter = <%= @filter %> +<% end -%> +<% if @backend -%> +backend = <%= @backend %> +<% end -%> +<% if @journalmatch -%> +journalmatch = <%= @journalmatch %> +<% end -%> +<% if @logpath -%> +logpath = <%= @logpath %> +<% end -%> +<% if @bantime -%> +bantime = <%= @bantime %> +<% end -%> +<% if @findtime -%> +findtime = <%= @findtime %> <% end -%> -port = <%= jail[:port] %> -filter = <%= jail[:filter] %> -logpath = <%= jail[:logpath] %> -<% if jail[:maxretry] -%> -maxretry = <%= jail[:maxretry] %> +<% if @maxretry -%> +maxretry = <%= @maxretry %> <% end -%> +<% if @ignoreips -%> +ignoreip = <%= @ignoreips.sort.join(" ") %> <% end -%>