vps/roles/nftables/tasks/main.yml

23 lines
519 B
YAML
Raw Normal View History

2024-02-17 19:01:04 +01:00
- name:
become: true
block:
- name: Install package nftables
apt:
name: nftables
- name: Template nftables.conf to /etc/nftables.conf
template:
src: nftables.conf
dest: /etc/nftables.conf
owner: root
group: root
mode: '755'
register: nftables_template_conf_result
- name: Restart nftables service
service:
name: nftables
state: restarted
enabled: true
when: nftables_template_conf_result['changed']