Compare commits
3 Commits
5913786a2f
...
d51f8fefaa
| Author | SHA1 | Date | |
|---|---|---|---|
|
d51f8fefaa
|
|||
|
9ff6e19135
|
|||
|
4680999680
|
@@ -9,6 +9,7 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
notify:
|
notify:
|
||||||
- Restart nftables
|
- Restart nftables
|
||||||
|
- Restart fail2ban
|
||||||
|
|
||||||
- name: Create /etc/nftables extra config directory
|
- name: Create /etc/nftables extra config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -19,14 +20,17 @@
|
|||||||
|
|
||||||
- name: Copy extra nftables configuration files
|
- name: Copy extra nftables configuration files
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: firehol_level1-ipv4.nft
|
src: "{{ item.src }}"
|
||||||
dest: /etc/nftables/firehol_level1-ipv4.nft
|
dest: /etc/nftables/{{ item.src }}
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
force: false
|
force: "{{ item.force }}"
|
||||||
|
loop:
|
||||||
|
- { src: firehol_level1-ipv4.nft, force: false }
|
||||||
notify:
|
notify:
|
||||||
- Restart nftables
|
- Restart nftables
|
||||||
|
- Restart fail2ban
|
||||||
|
|
||||||
- name: Copy nftables update scripts
|
- name: Copy nftables update scripts
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
@@ -36,6 +40,27 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
||||||
|
- name: Remove deprecated data and scripts
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
loop:
|
||||||
|
- /etc/nftables/spamhaus-ipv4.nft
|
||||||
|
- /etc/nftables/spamhaus-ipv6.nft
|
||||||
|
- /etc/nftables/abuseipdb-ipv4.nft
|
||||||
|
- /etc/nftables/abuseipdb-ipv6.nft
|
||||||
|
- /etc/nftables/abusech-ipv4.nft
|
||||||
|
- /usr/local/bin/update-abusech-nftables.sh
|
||||||
|
- /usr/local/bin/update-spamhaus-nftables.sh
|
||||||
|
- /etc/systemd/system/update-abusech-nftables.service
|
||||||
|
- /etc/systemd/system/update-abusech-nftables.timer
|
||||||
|
- /etc/systemd/system/update-spamhaus-nftables.service
|
||||||
|
- /etc/systemd/system/update-spamhaus-nftables.timer
|
||||||
|
- /usr/local/bin/aggregate-cidr-addresses.pl
|
||||||
|
notify:
|
||||||
|
- Restart nftables
|
||||||
|
- Restart fail2ban
|
||||||
|
|
||||||
- name: Copy nftables systemd units
|
- name: Copy nftables systemd units
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
@@ -56,9 +81,11 @@
|
|||||||
|
|
||||||
- name: Start and enable nftables update timers
|
- name: Start and enable nftables update timers
|
||||||
ansible.builtin.systemd_service:
|
ansible.builtin.systemd_service:
|
||||||
name: update-firehol-nftables.timer
|
name: "{{ item }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
loop:
|
||||||
|
- update-firehol-nftables.timer
|
||||||
|
|
||||||
- name: Start and enable nftables
|
- name: Start and enable nftables
|
||||||
ansible.builtin.systemd_service:
|
ansible.builtin.systemd_service:
|
||||||
|
|||||||
Reference in New Issue
Block a user