Files
ansible/roles/firewall/tasks/main.yml
2025-08-04 18:24:30 +10:00

24 lines
283 B
YAML

- name: Install ufw
apt:
name: ufw
state: present
- name: Allow SSH
ufw:
rule: allow
port: 22
- name: Allow HTTP/HTTPS
ufw:
rule: allow
port: "{{ item }}"
loop:
- 80
- 443
- name: Deny all others
ufw:
state: enabled
policy: deny