---
- name: Install UFW firewall
apt:
name: ufw
state: present
- name: Set UFW default deny policy
ufw:
state: enabled
policy: deny
- name: Allow SSH through firewall
rule: allow
port: "22"
proto: tcp