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
|
if node.os != "alpine":
raise BundleError(f"{node.name}: OS {node.os} is not supported.")
from os.path import join
svc_openrc = {
"fail2ban": {
"enabled": True,
"running": True,
"needs": {
"pkg_apk:fail2ban",
"bundle:firewall",
"bundle:tgnotify",
},
},
}
files = {
}
repo.libs.gen.add_files_recursive(
files,
join(repo.path, "bundles", "fail2ban", "files"),
{
"triggers": {
"svc_openrc:fail2ban:restart",
},
},
)
# TODO: metrics? https://github.com/hectorjsmith/fail2ban-prometheus-exporter
|