ansible-edda/tasks/firewall.yml

24 lines
422 B
YAML
Raw Normal View History

2022-09-11 20:55:30 +02:00
- name: Install nftables
apt:
name: nftables
- name: Configure nftables
template:
2022-09-21 23:57:15 +02:00
src: ./filesystem/common/etc/nftables.conf.j2
2022-09-11 20:55:30 +02:00
dest: /etc/nftables.conf
mode: 0755
register: nftables_conf
- name: Enable/start nftables
systemd:
name: nftables
state: started
enabled: yes
- name: Restart nftables
systemd:
name: nftables
state: restarted
when:
nftables_conf is changed