]> git.openstreetmap.org Git - chef.git/commitdiff
Make more fail2ban jail properties optional
authorTom Hughes <tom@compton.nu>
Sat, 12 Oct 2019 14:49:19 +0000 (15:49 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 12 Oct 2019 14:49:19 +0000 (15:49 +0100)
cookbooks/fail2ban/templates/default/jail.erb

index a5cdd4895b2191097a7d19745ed97cf85613c469..91978488c5569caaed9f077b6ced382f2ab343ea 100644 (file)
@@ -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 -%>