diff --git a/ansible/playbooks/01-common.yml b/ansible/playbooks/01-common.yml index 473b81e..233a24a 100644 --- a/ansible/playbooks/01-common.yml +++ b/ansible/playbooks/01-common.yml @@ -35,12 +35,18 @@ replace: 'SELINUX=permissive' # ── Firewalld ───────────────────────────────────────────────────── + - name: Check if firewalld is installed + command: systemctl list-unit-files firewalld.service + register: firewalld_check + changed_when: false + failed_when: false + - name: Disable and stop firewalld systemd: name: firewalld enabled: false state: stopped - ignore_errors: true # may not be installed + when: "'firewalld.service' in firewalld_check.stdout" # ── Swap ────────────────────────────────────────────────────────── - name: Disable swap now