feat : Add Fail2ban integration with Proxmox Firewall #43

Merged
Jose merged 13 commits from dev into main 2026-02-24 19:22:28 +01:00
Showing only changes of commit e26b3f01f8 - Show all commits

View File

@@ -115,11 +115,6 @@
# Create Proxmox firewall IPSet
#################################################
- name: fail2ban | Ensure firewall directory exists
ansible.builtin.file:
path: /etc/pve/firewall
state: directory
- name: fail2ban | Add Fail2Ban IPSet to cluster firewall
ansible.builtin.blockinfile:
path: "{{ pve_firewall_config }}"
@@ -144,7 +139,11 @@
IN DROP -source +{{ f2b_ipset_name }}
- name: fail2ban | Extract corosync ring0 address
ansible.builtin.shell: grep ring0_addr /etc/pve/corosync.conf | awk '{print $2}'
ansible.builtin.shell: |
set -o pipefail
grep ring0_addr /etc/pve/corosync.conf | awk '{print $2}'
args:
executable: /bin/bash
register: corosync_ip
changed_when: false
when: cluster_status.stat.exists