feat ✨: Add Fail2ban integration with Proxmox Firewall #43
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user