1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# init_vm.yml --- - hosts: "{{ host }}" tasks: - include_role: name: vmm tasks_from: init_vm_alpine.yml when: groups["alpine"] | select("search", guest) | list | length > 0 - include_role: name: vmm tasks_from: init_vm_openbsd.yml when: groups["openbsd"] | select("search", guest) | list | length > 0