Consolidate fail2ban truthy values into shared constants

This commit is contained in:
2026-04-14 09:03:49 +02:00
parent b4959133dd
commit 5a9d226cca
4 changed files with 50 additions and 13 deletions

View File

@@ -16,6 +16,9 @@ DEFAULT_FAIL2BAN_SOCKET: Final[str] = "/var/run/fail2ban/fail2ban.sock"
FAIL2BAN_SOCKET_TIMEOUT_SECONDS: Final[float] = 5.0
"""Maximum seconds to wait for a response from the fail2ban socket."""
FAIL2BAN_TRUTHY_VALUES: Final[frozenset[str]] = frozenset({"true", "yes", "1"})
"""String values treated as boolean true by fail2ban configuration parsers."""
# ---------------------------------------------------------------------------
# Database
# ---------------------------------------------------------------------------