From 9e91be40434dd8383d970b24d4c92fa7122d1a61 Mon Sep 17 00:00:00 2001 From: Ben Lovett Date: Sun, 4 Aug 2024 14:47:43 -0700 Subject: [PATCH] fix: ensure that python3-systemd on debian 12 or higher --- tasks/fail2ban.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasks/fail2ban.yml b/tasks/fail2ban.yml index 8383ed9..e1c154a 100644 --- a/tasks/fail2ban.yml +++ b/tasks/fail2ban.yml @@ -12,6 +12,14 @@ state: present when: ansible_os_family == 'Debian' +- name: Install python3-systemd (Debian) + package: + name: python3-systemd + state: present + when: + - ansible_os_family == 'Debian' + - ansible_distribution_major_version | int >= 12 + - name: Copy jail custom configuration file into place. template: src: "{{ security_fail2ban_custom_configuration_template }}"