fix(firewalld): adjust firewall only when it's set up

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-07-22 10:39:21 +02:00
parent eaaf707b60
commit 9d89a874ec
Signed by: mfocko
SSH key fingerprint: SHA256:icm0fIOSJUpy5+1x23sfr+hLtF9UhY8VpMC7H4WFJP8
3 changed files with 4 additions and 0 deletions

View file

@ -15,6 +15,7 @@
immediate: true
permanent: true
state: enabled
when: ansible_facts.services['firewalld'] is defined
tags: firewall
- name: Enable cups

View file

@ -80,6 +80,7 @@
loop:
- http
- https
when: ansible_facts.services['firewalld'] is defined
tags: firewall
- name: Enable nginx

View file

@ -41,6 +41,7 @@
immediate: true
permanent: true
state: enabled
when: ansible_facts.services['firewalld'] is defined
notify: "Restart SSH server"
tags: firewall
@ -49,6 +50,7 @@
service: ssh
permanent: true
state: disabled
when: ansible_facts.services['firewalld'] is defined
tags: firewall
- name: Set trusted CA