diff --git a/roles/lmn_exam/tasks/main.yml b/roles/lmn_exam/tasks/main.yml index aba8b29..4670933 100644 --- a/roles/lmn_exam/tasks/main.yml +++ b/roles/lmn_exam/tasks/main.yml @@ -62,9 +62,11 @@ src: no-way-out.xml.j2 dest: "/etc/firewalld/policies/no-way-out-{{ item }}.xml" mode: '0644' - loop: - - HOST - - libvirt + vars: + zones: + - HOST + - "{{ 'libvirt' if vm_support | default(false) else '' }}" + loop: "{{ zones | reject('match','^$') }}" when: - exam_destination_allowed_ipv4 is defined - exam_destination_allowed_ipv4 | length > 0