homelab/roles/libvirt/tasks/main.yml

18 lines
347 B
YAML

- name: Install QEMU/KVM
apt:
name: qemu-kvm
state: present
- name: Install Libvirt
apt:
name: ["libvirt-clients", "libvirt-daemon-system"]
state: present
- name: Add user to libvirt group
user:
name: "{{ item }}"
groups: libvirt
append: yes
with_items: "{{ libvirt_users }}"
when: libvirt_users is defined