From e26b3f01f891b203aaa85b0853222d571e7678c6 Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 24 Feb 2026 18:21:50 +0100 Subject: [PATCH] =?UTF-8?q?chore=20=F0=9F=93=A6:=20Remove=20redundant=20di?= =?UTF-8?q?rectory=20creation=20and=20update=20shell=20command=20for=20rob?= =?UTF-8?q?ustness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes unnecessary directory creation steps in the build process, simplifying the setup. Additionally, it updates the shell command to be more robust and reliable. --- tasks/fail2ban.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tasks/fail2ban.yml b/tasks/fail2ban.yml index 15456aa..3824665 100644 --- a/tasks/fail2ban.yml +++ b/tasks/fail2ban.yml @@ -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