| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # == Type: fail2ban::filter | |
| 2 # | |
| 3 # Manage filter information and files for any custom filter we create | |
|
mathias
2016/11/24 16:08:48
Please use un-personalized text in documentation,
f.lopez
2016/11/25 15:13:49
Acknowledged.
| |
| 4 # | |
| 5 # == Parameters: | |
| 6 # | |
| 7 # [*failregex*] | |
| 8 # The regular expressions used to detect break-in attempts, password failures, etc. | |
| 9 # One per line | |
|
mathias
2016/11/24 16:08:48
A bit too specific. Something like "The regular ex
f.lopez
2016/11/25 15:13:48
Acknowledged.
| |
| 10 # | |
| 11 # === Examples: | |
| 12 # | |
| 13 # filters => { | |
| 14 # 'wordpress' => { | |
| 15 # failregex => [ | |
| 16 # '^<HOST>.*\"WordPress\/.*', | |
| 17 # ], | |
| 18 # } | |
| 19 # }, | |
|
mathias
2016/11/24 16:08:48
The example is not valid Puppet code, a snippet at
f.lopez
2016/11/25 15:13:48
Acknowledged.
| |
| 20 define fail2ban::filter ( | |
| 21 $failregex = undef, | |
| 22 $ensure = 'present', | |
|
mathias
2016/11/24 16:08:48
The $ensure parameter is not documented yet.
f.lopez
2016/11/25 15:13:49
Acknowledged.
| |
| 23 ) { | |
| 24 | |
| 25 include fail2ban | |
| 26 include stdlib | |
| 27 | |
| 28 if $failregex != undef { | |
|
mathias
2016/11/24 16:08:48
This condition does not make much sense in this co
f.lopez
2016/11/25 15:13:49
There can be cases where an already existing filte
| |
| 29 file {"/etc/fail2ban/filter.d/$title.conf": | |
| 30 ensure => $ensure, | |
| 31 content => template("fail2ban/filter.erb"), | |
| 32 group => 'root', | |
| 33 mode => '0644', | |
| 34 owner => 'root', | |
| 35 require => Package['fail2ban'], | |
| 36 notify => Service['fail2ban'], | |
| 37 } | |
| 38 } | |
| 39 } | |
| OLD | NEW |