ansible/roles/ufw/tasks/configure.yaml

13 lines
375 B
YAML
Raw Normal View History

2024-04-14 23:32:50 +00:00
---
- name: set ufw state
community.general.ufw:
state: "{{ ufw_state | default('enabled') }}"
policy: "{{ ufw_policy | default('allow') }}"
- name: configure rules
community.general.ufw:
port: "{{ item.port | default(omit) }}"
proto: "{{ item.proto | default(omit) }}"
rule: "{{ item.rule | default(omit) }}"
loop: "{{ ufw_rules | default([]) }}"