Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/fail2ban/templates/jail.erb

Issue 29364214: Issue 2487 - Introduce fail2ban module (Closed)
Patch Set: For comment 22 and 23 Created Dec. 2, 2016, 2:22 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/fail2ban/templates/filter.erb ('k') | modules/private-stub/hiera/base.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/fail2ban/templates/jail.erb
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/fail2ban/templates/jail.erb
@@ -0,0 +1,15 @@
+<% @jails.each do |name, config| -%>
+<% if !config['logpath'].empty? -%>
+[<%= name %>]
+<% if config['filter'].empty? -%>
+filter = <%= name %>
+<% end -%>
+<% configuration = scope.function_merge(@jail_default, config) -%>
+<% configuration.each do |key, value| -%>
+<%= key %> = <%= value %>
+<% end %>
+<% else -%>
+<% raise Puppet::Error, "Log path missing from configuration" -%>
+<% end -%>
+<% end -%>
+
« no previous file with comments | « modules/fail2ban/templates/filter.erb ('k') | modules/private-stub/hiera/base.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld