Add fail2ban_ignoreip: a list of addresses, networks or hostnames written as ignoreip in the [DEFAULT] section of /etc/fail2ban/jail.local. The default is ["127.0.0.1/8", "::1"], which is fail2ban's own default, so nothing changes unless a consumer sets it.
Why
The role has no way to keep a trusted address from being banned. A mistyped key or a looping health check from the machine that runs Ansible, or from a CI runner, can get that address banned, and then automation can no longer reach the host to fix it. Operators of a home lab need to exempt those addresses on every jail.
[DEFAULT] is the one place that covers both the jails in fail2ban_jails (written to jail.local) and the per-service jails that other roles add with tasks_from: service_jail (written to jail.d). A per-jail ignoreip would have to be repeated on every jail and would be missed by service jails.
Scope
One variable, fail2ban_ignoreip, typed in meta/argument_specs.yml and documented in the README.
A [DEFAULT] block in templates/jail.local.j2.
Validation in tasks/validate.yml: every entry is a non-empty string without whitespace (entries are joined with spaces, so a value with a space would silently become two entries). Regexes end in \Z.
molecule/default/verify.yml: assert that the default is applied and that a configured value reaches the running jail (fail2ban-client get sshd ignoreip).
A changelog fragment (minor_changes).
Compatibility
With the default value the rendered jail.local gains a [DEFAULT] block, so the first run after upgrading restarts fail2ban once (the existing handler is Restart, which clears the current ban list). After that the role is idempotent.
Out of scope
No second _extra list. A single list is enough for a generic role; consumers who want a base list plus additions can compose it in their own variables.
## What
Add `fail2ban_ignoreip`: a list of addresses, networks or hostnames written as `ignoreip` in the `[DEFAULT]` section of `/etc/fail2ban/jail.local`. The default is `["127.0.0.1/8", "::1"]`, which is fail2ban's own default, so nothing changes unless a consumer sets it.
## Why
The role has no way to keep a trusted address from being banned. A mistyped key or a looping health check from the machine that runs Ansible, or from a CI runner, can get that address banned, and then automation can no longer reach the host to fix it. Operators of a home lab need to exempt those addresses on every jail.
`[DEFAULT]` is the one place that covers both the jails in `fail2ban_jails` (written to `jail.local`) and the per-service jails that other roles add with `tasks_from: service_jail` (written to `jail.d`). A per-jail `ignoreip` would have to be repeated on every jail and would be missed by service jails.
## Scope
- One variable, `fail2ban_ignoreip`, typed in `meta/argument_specs.yml` and documented in the README.
- A `[DEFAULT]` block in `templates/jail.local.j2`.
- Validation in `tasks/validate.yml`: every entry is a non-empty string without whitespace (entries are joined with spaces, so a value with a space would silently become two entries). Regexes end in `\Z`.
- `molecule/default/verify.yml`: assert that the default is applied and that a configured value reaches the running jail (`fail2ban-client get sshd ignoreip`).
- A changelog fragment (`minor_changes`).
## Compatibility
With the default value the rendered `jail.local` gains a `[DEFAULT]` block, so the first run after upgrading restarts fail2ban once (the existing handler is `Restart`, which clears the current ban list). After that the role is idempotent.
## Out of scope
No second `_extra` list. A single list is enough for a generic role; consumers who want a base list plus additions can compose it in their own variables.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
Add
fail2ban_ignoreip: a list of addresses, networks or hostnames written asignoreipin the[DEFAULT]section of/etc/fail2ban/jail.local. The default is["127.0.0.1/8", "::1"], which is fail2ban's own default, so nothing changes unless a consumer sets it.Why
The role has no way to keep a trusted address from being banned. A mistyped key or a looping health check from the machine that runs Ansible, or from a CI runner, can get that address banned, and then automation can no longer reach the host to fix it. Operators of a home lab need to exempt those addresses on every jail.
[DEFAULT]is the one place that covers both the jails infail2ban_jails(written tojail.local) and the per-service jails that other roles add withtasks_from: service_jail(written tojail.d). A per-jailignoreipwould have to be repeated on every jail and would be missed by service jails.Scope
fail2ban_ignoreip, typed inmeta/argument_specs.ymland documented in the README.[DEFAULT]block intemplates/jail.local.j2.tasks/validate.yml: every entry is a non-empty string without whitespace (entries are joined with spaces, so a value with a space would silently become two entries). Regexes end in\Z.molecule/default/verify.yml: assert that the default is applied and that a configured value reaches the running jail (fail2ban-client get sshd ignoreip).minor_changes).Compatibility
With the default value the rendered
jail.localgains a[DEFAULT]block, so the first run after upgrading restarts fail2ban once (the existing handler isRestart, which clears the current ban list). After that the role is idempotent.Out of scope
No second
_extralist. A single list is enough for a generic role; consumers who want a base list plus additions can compose it in their own variables.