Apply libvirt firewall policy only on devices with vm_support

This commit is contained in:
Raphael Dannecker 2025-12-17 13:19:43 +01:00
parent 405fed1fcf
commit 93a0f07846

View file

@ -62,9 +62,11 @@
src: no-way-out.xml.j2 src: no-way-out.xml.j2
dest: "/etc/firewalld/policies/no-way-out-{{ item }}.xml" dest: "/etc/firewalld/policies/no-way-out-{{ item }}.xml"
mode: '0644' mode: '0644'
loop: vars:
- HOST zones:
- libvirt - HOST
- "{{ 'libvirt' if vm_support | default(false) else '' }}"
loop: "{{ zones | reject('match','^$') }}"
when: when:
- exam_destination_allowed_ipv4 is defined - exam_destination_allowed_ipv4 is defined
- exam_destination_allowed_ipv4 | length > 0 - exam_destination_allowed_ipv4 | length > 0