common/tasks/firewall/firewall-rules.yaml
2024-11-22 11:13:16 +01:00

12 lines
326 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"