The host has been manually cleaned up (removed old packages and config) and this config has been deployed already.
22 lines
505 B
YAML
22 lines
505 B
YAML
- name: ensure nftables is installed
|
|
ansible.builtin.apt:
|
|
name: nftables
|
|
state: present
|
|
become: true
|
|
|
|
- name: deploy nftables configuration
|
|
ansible.builtin.copy:
|
|
content: "{{ nftables__config }}"
|
|
dest: "/etc/nftables.conf"
|
|
mode: "0644"
|
|
owner: root
|
|
group: root
|
|
become: true
|
|
notify: Reload nftables service
|
|
|
|
- name: ensure nftables service is enabled and started
|
|
ansible.builtin.systemd_service:
|
|
name: nftables
|
|
enabled: true
|
|
state: started
|
|
become: true
|