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

24 lines
389 B
YAML
Raw Normal View History

2022-02-05 20:00:55 +01:00
---
- name: "Install ufw via apt"
2023-08-30 23:13:59 +02:00
apt:
2022-02-05 20:00:55 +01:00
update_cache: yes
state: present
name:
- ufw
- name: Reset ufw rules to default
community.general.ufw:
state: reset
2022-04-12 16:49:59 +02:00
- name: Enable ufw
community.general.ufw:
state: enabled
2022-02-05 20:00:55 +01:00
- name: Allow ssh via ufw
community.general.ufw:
rule: allow
port: ssh
2023-08-28 09:55:03 +02:00
src: "{{ item }}"
with_items: "{{ allowedranges }}"
2022-04-16 19:55:29 +02:00
...