common/tasks/firewall/firewall-rules.yaml
2025-07-11 19:25:53 +02:00

11 lines
320 B
YAML

---
# create firewall rule
- name: "firewall - allow {{ __rule['to_port'] }} from {{ __rule['from_ip'] }}"
community.general.ufw:
rule: "allow"
direction: "in"
proto: "{{ __rule['proto'] | default('tcp') }}"
from_ip: "{{ __rule['from_ip'] }}"
to_port: "{{ __rule['to_port'] }}"
tags: "firewall"