Skip to content

Commit

Permalink
Merge pull request #79 from Ragilo/systemd_fix_debian12
Browse files Browse the repository at this point in the history
Added python3-systemd as a dependency for systemd backend
  • Loading branch information
tersmitten authored Dec 4, 2023
2 parents 643074a + d4df614 commit bf98a3a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ None
- `fail2ban_bantime`: [default: `600`]: Sets the bantime
- `fail2ban_maxretry`: [default: `3`]: Maximum number of retries before the host is put into jail
- `fail2ban_findtime`: [default: `600`]: A host is banned if it has generated `fail2ban_maxretry` during the last `fail2ban_findtime`
- `fail2ban_backend`: [default: `auto`]: Specifies the backend used to get files modification
- `fail2ban_backend`: [default: `auto`]: Specifies the backend used to get files modification. For Debian 12, `systemd` is required.
- `fail2ban_banaction`: [default: `iptables-multiport`]: Sets the global/default banaction
- `fail2ban_banaction_allports`: [default: `iptables-allports`]: Sets the global/default banaction for allports
- `fail2ban_mta`: [default: `sendmail`]: Email action
Expand Down
12 changes: 12 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
- fail2ban
- fail2ban-install

- name: Install python3-systemd for systemd backend
ansible.builtin.apt:
name: python3-systemd
state: "{{ apt_install_state | default('latest') }}"
update_cache: true
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}"
when: fail2ban_backend == 'systemd'
tags:
- configuration
- fail2ban
- fail2ban-install

- name: get fail2ban version
ansible.builtin.command: >
fail2ban-server -V
Expand Down

0 comments on commit bf98a3a

Please sign in to comment.