Puppet Class: confdroid_fail2ban::main::files

Inherits:
confdroid_fail2ban::params
Defined in:
manifests/main/files.pp

Summary

Class manages all configuration files required for confdroid_fail2ban.

Overview

confdroid_fail2ban::main::files.pp Module name: confdroid_fail2ban Author: 12ww1160 (12ww1160@confdroid.com)



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'manifests/main/files.pp', line 6

class confdroid_fail2ban::main::files (

) inherits confdroid_fail2ban::params {
  require confdroid_fail2ban::main::dirs

  if $fn_manage_config == true {
    # manage fail2ban.conf

    file { $fn_fail2ban_conf_file:
      ensure   => file,
      path     => $fn_fail2ban_conf_file,
      owner    => 'root',
      group    => 'root',
      mode     => '0640',
      selrange => s0,
      selrole  => object_r,
      seltype  => etc_t,
      seluser  => system_u,
      content  => template($fn_fail2ban_conf_erb),
      notify   => Service[$fn_service],
    }

    # manage fail2ban.local

    file { $fn_fail2ban_local_file:
      ensure   => file,
      path     => $fn_fail2ban_local_file,
      owner    => 'root',
      group    => 'root',
      mode     => '0640',
      selrange => s0,
      selrole  => object_r,
      seltype  => etc_t,
      seluser  => system_u,
      content  => template($fn_fail2ban_local_erb),
      notify   => Service[$fn_service],
    }

    # manage jail.conf

    file { $fn_jail_conf_file:
      ensure   => file,
      path     => $fn_jail_conf_file,
      owner    => 'root',
      group    => 'root',
      mode     => '0640',
      selrange => s0,
      selrole  => object_r,
      seltype  => etc_t,
      seluser  => system_u,
      content  => template($fn_jail_conf_erb),
      notify   => Service[$fn_service],
    }

    # manage jail.local

    file { $fn_jail_local_file:
      ensure   => file,
      path     => $fn_jail_local_file,
      owner    => 'root',
      group    => 'root',
      mode     => '0640',
      selrange => s0,
      selrole  => object_r,
      seltype  => etc_t,
      seluser  => system_u,
      content  => template($fn_jail_local_erb),
      notify   => Service[$fn_service],
    }

    # manage paths-common.conf

    file { $fn_paths_common_file:
      ensure   => file,
      path     => $fn_paths_common_file,
      owner    => 'root',
      group    => 'root',
      mode     => '0640',
      selrange => s0,
      selrole  => object_r,
      seltype  => etc_t,
      seluser  => system_u,
      content  => template($fn_paths_common_erb),
      notify   => Service[$fn_service],
    }
  }
}