https://github.com/walidsa3d/ansible-fail2ban
An Ansible role to install fail2ban on Ubuntu/Debian.
https://github.com/walidsa3d/ansible-fail2ban
ansible ansible-role fail2ban
Last synced: 4 months ago
JSON representation
An Ansible role to install fail2ban on Ubuntu/Debian.
- Host: GitHub
- URL: https://github.com/walidsa3d/ansible-fail2ban
- Owner: walidsa3d
- License: mit
- Created: 2024-07-28T13:42:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-03T09:28:32.000Z (about 1 year ago)
- Last Synced: 2025-06-26T16:05:30.307Z (4 months ago)
- Topics: ansible, ansible-role, fail2ban
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fail2ban
An Ansible role to install fail2ban on Ubuntu/Debian.


## Table of Contents- [Requirements](#requirements)
- [Role Variables](#role-variables)
- [Dependencies](#dependencies)
- [Example Playbook](#example-playbook)
- [Molecule Testing](#molecule-testing)
- [Contributing](#contributing)
- [License](#license)## Requirements
- Ansible >= 2.9
- Supported platforms:
- Ubuntu## Role Variables
The variables used in this role are defined in `defaults/main.yml` and can be customized as per your requirements. Here are some of the main variables:
| Variable | Default Value | Description |
|--------------------|-------------------------|--------------------------------------|
| `logelevel` | `INFO` | log level|
| `ban_ignoreip` | `INFO` | excluded ips|
| `bantime` | `600` | number of seconds an IP address is banned |
| `findtime` | `600` | retris must occur within the findtime duration. |
| `maxretry` | `5` | max retries before ban|## Dependencies
This role has no external dependencies.
## Example Playbook
Here is an example of how to use this role in a playbook:
```yaml
---
- name: Install and configure Fail2ban.
hosts: all
become: true
roles:
- role: walidsa3d.failban
```## License
This project is licensed under the MIT License. See the LICENSE file for more details.