Files
Kamino/roles/fail2ban/tasks/validate.yml
T
Defame1297andClaude Sonnet 5.5 1ea478b124
Build / build (pull_request) Successful in 23s
Lint / lint (pull_request) Successful in 16s
Molecule / molecule (pull_request) Successful in 3m11s
feat(fail2ban): add the fail2ban role
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
2026-11-08 21:20:08 +00:00

14 lines
450 B
YAML

---
- name: Validate Fail2Ban jails
ansible.builtin.assert:
that:
- item.name is defined
- item.enabled is defined
- item.filter is defined
- item.logpath is defined or item.journalmatch is defined or item.backend | default('') == 'systemd'
- item.maxretry is defined
- item.bantime is defined
- item.findtime is defined
fail_msg: "Invalid Fail2Ban jail: {{ item }}"
loop: "{{ fail2ban_jails }}"