chore 📦: Remove redundant directory creation and update shell command for robustness
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 13s
Gitleaks Scan / gitleaks (push) Successful in 5s
Markdown Lint / markdown-lint (push) Successful in 6s

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.
This commit is contained in:
2026-02-24 18:21:50 +01:00
parent 8d40abc15b
commit e26b3f01f8

View File

@@ -115,11 +115,6 @@
# Create Proxmox firewall IPSet # 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 - name: fail2ban | Add Fail2Ban IPSet to cluster firewall
ansible.builtin.blockinfile: ansible.builtin.blockinfile:
path: "{{ pve_firewall_config }}" path: "{{ pve_firewall_config }}"
@@ -144,7 +139,11 @@
IN DROP -source +{{ f2b_ipset_name }} IN DROP -source +{{ f2b_ipset_name }}
- name: fail2ban | Extract corosync ring0 address - 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 register: corosync_ip
changed_when: false changed_when: false
when: cluster_status.stat.exists when: cluster_status.stat.exists