fix: rewrite ufw exceptions condition (#403)

Signed-off-by: Rafael Alexandre <r.alexandre99@gmail.com>
This commit is contained in:
Rafael Alexandre
2025-04-18 18:07:23 +02:00
committed by GitHub
parent 6809dc8913
commit f3d8cc0b18

View File

@@ -42,7 +42,7 @@
- name: If ufw enabled, open api port
when:
- ufw_status['stdout'] == "Status':' active"
- "'Status: active' in ufw_status['stdout']"
community.general.ufw:
rule: allow
port: "{{ api_port }}"
@@ -50,7 +50,7 @@
- name: If ufw enabled, open etcd ports
when:
- ufw_status['stdout'] == "Status':' active"
- "'Status: active' in ufw_status['stdout']"
- groups[server_group] | length > 1
community.general.ufw:
rule: allow
@@ -59,7 +59,7 @@
- name: If ufw enabled, allow default CIDRs
when:
- ufw_status['stdout'] == "Status':' active"
- "'Status: active' in ufw_status['stdout']"
community.general.ufw:
rule: allow
src: '{{ item }}'