chore 📦: Remove redundant directory creation and update shell command for robustness
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user