| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 <% @jail_config.each do |name, config| -%> | 1 <% @jails.each do |name, config| -%> |
| 2 <% if !config['logpath'].empty? -%> | 2 <% if !config['logpath'].empty? -%> |
| 3 [<%= name %>] | 3 [<%= name %>] |
| 4 <% if config['filter'].empty? -%> | |
| 5 filter = <%= name %> | |
| 6 <% end -%> | |
| 7 <% configuration = scope.function_merge(@jail_default, config) -%> | |
| 8 <% configuration.each do |key, value| -%> | |
| 9 <%= key %> = <%= value %> | |
| 10 <% end %> | |
| 11 <% else -%> | |
| 12 <% raise Puppet::Error, "Log path missing from configuration" -%> | |
| 13 <% end -%> | |
| 14 <% end -%> | |
| 4 | 15 |
| 5 enabled = <%= config['enabled'] ||= true %> | |
| 6 port = <%= config['port'] ||= 'all' %> | |
|
f.nicolaisen
2016/11/25 16:23:30
'all' is not a valid port range for iptables, ref
f.lopez
2016/11/25 17:41:10
Well, according to the examples provided by fail2b
| |
| 7 filter = <%= name %> | |
| 8 logpath = <%= config['logpath'] %> | |
| 9 maxretry = <%= config['maxretry'] ||= 6 %> | |
| 10 bantime = <%= config['bantime']||= 3600 %> | |
| 11 <% end -%> | |
| 12 <% end -%> | |
| LEFT | RIGHT |