Use nftables for firewall on ingress
See ya never, iptables!
This commit is contained in:
19
ansible/roles/ingress/tasks/firewall.yml
Normal file
19
ansible/roles/ingress/tasks/firewall.yml
Normal file
@ -0,0 +1,19 @@
|
||||
- name: Install nftables
|
||||
package:
|
||||
name: nftables
|
||||
become: true
|
||||
|
||||
- name: Copy firewall config
|
||||
template:
|
||||
src: files/nftables.conf
|
||||
dest: /etc/nftables.conf
|
||||
validate: nft -c -f %s
|
||||
become: true
|
||||
notify: reload firewall
|
||||
|
||||
- name: Enable nftables
|
||||
service:
|
||||
name: nftables
|
||||
enabled: true
|
||||
state: started
|
||||
become: true
|
@ -3,3 +3,6 @@
|
||||
|
||||
- name: Configure nginx
|
||||
include_tasks: nginx.yml
|
||||
|
||||
- name: Configure firewall
|
||||
include_tasks: firewall.yml
|
||||
|
Reference in New Issue
Block a user