vm-ansible/roles/common/tasks/ufw.yaml

21 lines
327 B
YAML
Raw Normal View History

2022-02-05 20:00:55 +01:00
---
- name: "Install ufw via apt"
apt:
update_cache: yes
state: present
name:
- ufw
- name: Enable ufw
community.general.ufw:
state: enabled
- name: Reset ufw rules to default
community.general.ufw:
state: reset
- name: Allow ssh via ufw
community.general.ufw:
rule: allow
port: ssh