Copied from the environment repository's roles/fail2ban and scrubbed for the Collection: galaxy namespace mortis, the molecule scenario calls the role by its FQCN (and takes its paths from the workflow, like docker's), README examples use mortis.kamino.fail2ban, repository-local issue references are dropped. mock_roles in .ansible-lint lists the new FQCN. Not verified locally: the molecule scenario (runs on the kamino-molecule runner in CI) and ansible-test sanity. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
22 lines
836 B
Django/Jinja
22 lines
836 B
Django/Jinja
# Managed by Ansible - Fail2Ban jail.local
|
|
|
|
{% for jail in fail2ban_jails %}
|
|
[{{ jail.name }}]
|
|
enabled = {{ jail.enabled | default(true) }}
|
|
port = {{ jail.port | default('any') }}
|
|
filter = {{ jail.filter | default(jail.name) }}
|
|
{% if jail.backend is defined or jail.journalmatch is defined %}
|
|
backend = {{ jail.backend | default('systemd') }}
|
|
{% endif %}
|
|
{% if jail.journalmatch is defined %}
|
|
journalmatch = {{ jail.journalmatch }}
|
|
{% endif %}
|
|
{% if (jail.backend | default('systemd' if jail.journalmatch is defined else 'auto')) != 'systemd' %}
|
|
logpath = {{ jail.logpath | default('/var/log/auth.log') }}
|
|
{% endif %}
|
|
maxretry = {{ jail.maxretry | default(fail2ban_defaults.maxretry) }}
|
|
bantime = {{ jail.bantime | default(fail2ban_defaults.bantime) }}
|
|
findtime = {{ jail.findtime | default(fail2ban_defaults.findtime) }}
|
|
|
|
{% endfor %}
|