Files
Kamino/roles/fail2ban/meta
Dragonish 2b994363d7 fix(fail2ban): refuse a scalar or non-string fail2ban_ignoreip
argument_specs accepts a plain string for a list option and leaves it a string,
and accepts a list holding a number or null. The pattern check then iterated a
string per character and rendered "1 . 2 . 3 . 4", or died with a TypeError on
null. Check the type first (assert stops at the first false item).

Also refuse ";" and "%" in an entry: Fail2Ban's config parser treats ";" after
whitespace as an inline comment, which drops the rest of the ignoreip line
without an error, and "%" as interpolation syntax, which fails the whole config
after jail.local is written. Add Molecule cases for a scalar string and a
semicolon entry.

Document what review found: service_jail does not read the variable, the
[DEFAULT] value replaces an ignoreip set in jail.conf or jail.d/*.conf, a failed
hostname lookup leaves the entry ineffective with a log warning (addresses and
networks are safer), and --tags fail2ban_configure skips the validation.

Assisted-by: Claude Code
2026-11-15 13:20:43 +00:00
..
2026-11-08 21:20:08 +00:00