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

Side by Side Diff: modules/fail2ban/manifests/filter.pp

Issue 29364214: Issue 2487 - Introduce fail2ban module (Closed)
Patch Set: Issue 2487 - Introduce fail2ban module Created Nov. 25, 2016, 3:17 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # == Type: fail2ban::filter
2 #
3 # Manage filter information and files for any custom filter.
4 #
5 # == Parameters:
6 #
7 # [*failregex*]
8 # The regular expressions applied to the filter.
9 #
10 # [*ensure*]
11 # A boolean to ensure the state of the file.
12 #
13 # === Examples:
14 #
15 # filters => {
16 # 'wordpress' => {
17 # failregex => [
18 # '^<HOST>.*\"WordPress\/.*',
19 # ],
20 # }
21 # },
22 define fail2ban::filter (
23 $failregex = undef,
24 $ensure = 'present',
25 ) {
26
27 include fail2ban
28 include stdlib
29
30 if ($failregex != undef) and ($ensure == 'present') {
31 file {"/etc/fail2ban/filter.d/$title.conf":
32 ensure => $ensure,
33 content => template("fail2ban/filter.erb"),
34 group => 'root',
35 mode => '0644',
36 owner => 'root',
37 require => Package['fail2ban'],
38 notify => Service['fail2ban'],
39 }
40 }
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld