summaryrefslogtreecommitdiff
path: root/services/applications/fail2ban.cf
blob: f2a5ff7e5e3dd9e21a07d8bc815911f3eef0843e (plain)
1
2
3
4
5
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
bundle agent fail2ban
{
    files:
        linux::
            "/etc/fail2ban/."
                create => "true",
                perms => system_owned("755"),
                classes => if_repaired("fail2ban_folder_repaired");
            "/etc/fail2ban/jail.local"
                perms => system_owned("444"),
                copy_from => local_cp("$(sys.inputdir)/templates/fail2ban/jail.local"),
                classes => if_repaired("fail2ban_jail_local_repaired");
    methods:
        centos::
            "any" usebundle => install_package("$(this.bundle)", "fail2ban-shorewall");
        debian|ubuntu::
            "any" usebundle => install_package("$(this.bundle)", "fail2ban");
    services:
        linux::
            "fail2ban"
                service_policy => "start",
                classes => if_repaired("fail2ban_service_repaired");
    commands:
        any::
            "/usr/sbin/service fail2ban restart" classes => if_repaired("fail2ban_service_repaired"), ifvarclass => "fail2ban_jail_local_repaired";
    reports:
        any::
            "$(this.bundle): /etc/fail2ban folder repaired" ifvarclass => "fail2ban_folder_repaired";
            "$(this.bundle): jail.local repaired" ifvarclass => "fail2ban_jail_local_repaired";
            "$(this.bundle): fail2ban service repaired" ifvarclass => "fail2ban_service_repaired";
}