homelab/roles/libvirt/tasks/main.yml

28 lines
593 B
YAML
Raw Normal View History

2020-02-09 03:49:25 +00:00
- name: Install QEMU/KVM
apt:
name: qemu-kvm
state: present
- name: Install Libvirt
apt:
name: ["libvirt-clients", "libvirt-daemon-system"]
state: present
2020-06-30 05:25:53 +00:00
- name: Add users to libvirt group
2020-02-09 03:49:25 +00:00
user:
name: "{{ item }}"
2020-02-09 03:49:25 +00:00
groups: libvirt
append: yes
with_items: "{{ libvirt_users }}"
when: libvirt_users is defined
2020-07-01 04:45:47 +00:00
- name: Download GNU/Linux ISOs
get_url:
url: "{{ item.url }}"
dest: /var/lib/libvirt/images
checksum: "{{ item.hash }}"
owner: libvirt-qemu
group: libvirt-qemu
loop: "{{ libvirt_isos }}"
when: libvirt_isos is defined