lab-ansible/roles/os_config/tasks/firewall.yml

15 lines
308 B
YAML
Raw Normal View History

2023-10-28 23:00:05 +00:00
# vim: ft=yaml.ansible
---
- name: Allow necessary ports in UFW
community.general.ufw:
to_port: "{{ item.port }}"
proto: "{{ item.proto }}"
comment: "{{ item.comment }}"
rule: allow
loop: "{{ open_ports }}"
- name: Enable UFW
community.general.ufw:
policy: deny
state: enabled