diff options
| author | Robert Günzler <r@gnzler.io> | 2025-09-07 17:32:13 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2025-09-07 17:42:42 +0200 |
| commit | 38be6c13f76e893cf47636257071b440dec0c5b2 (patch) | |
| tree | f7ded3235a7e3362cbd1ed3d91523968fe0faf90 /bundles/fail2ban/items.py | |
initial commit
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bundles/fail2ban/items.py')
| -rw-r--r-- | bundles/fail2ban/items.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/bundles/fail2ban/items.py b/bundles/fail2ban/items.py new file mode 100644 index 0000000..9627587 --- /dev/null +++ b/bundles/fail2ban/items.py @@ -0,0 +1,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 |