Add step to enable ufw rules
This commit is contained in:
@@ -3,6 +3,11 @@
|
|||||||
name: ufw
|
name: ufw
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
# UFW logging can full up the kernel (dmesg) and message logs
|
||||||
|
- name: Disable logging
|
||||||
|
community.general.ufw:
|
||||||
|
logging: 'off'
|
||||||
|
|
||||||
- name: Allow OpenSSH inbound
|
- name: Allow OpenSSH inbound
|
||||||
community.general.ufw:
|
community.general.ufw:
|
||||||
rule: allow
|
rule: allow
|
||||||
@@ -14,8 +19,14 @@
|
|||||||
port: ssh
|
port: ssh
|
||||||
proto: tcp
|
proto: tcp
|
||||||
|
|
||||||
- name: Enable ufw
|
- name: Enable ufw system service
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: ufw
|
name: ufw
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|
||||||
|
# This is necessary in addition to enabling the system service
|
||||||
|
- name: Enable ufw rules
|
||||||
|
community.general.ufw:
|
||||||
|
state: enabled
|
||||||
|
policy: deny
|
||||||
|
Reference in New Issue
Block a user