aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/workstation/defaults/main.yml1
-rw-r--r--roles/workstation/tasks/libvirt.yml17
-rw-r--r--roles/workstation/tasks/os_archlinux.yml3
3 files changed, 21 insertions, 0 deletions
diff --git a/roles/workstation/defaults/main.yml b/roles/workstation/defaults/main.yml
index 199625e..b36cbfd 100644
--- a/roles/workstation/defaults/main.yml
+++ b/roles/workstation/defaults/main.yml
@@ -77,6 +77,7 @@ workstation_pkgs:
- python-poetry
- python-pynvim
- python-qrencode
+ - qemu
- signify
- strace
- tar
diff --git a/roles/workstation/tasks/libvirt.yml b/roles/workstation/tasks/libvirt.yml
new file mode 100644
index 0000000..36d3fa5
--- /dev/null
+++ b/roles/workstation/tasks/libvirt.yml
@@ -0,0 +1,17 @@
+- name: install libvirt
+ package:
+ name:
+ - cdrtools
+ - dnsmasq
+ - ebtables
+ - libvirt
+ state: present
+
+- name: append current user to virt groups
+ user:
+ name: "{{ workstation_user }}"
+ groups: "{{ item }}"
+ append: true
+ loop:
+ - kvm
+ - libvirt
diff --git a/roles/workstation/tasks/os_archlinux.yml b/roles/workstation/tasks/os_archlinux.yml
index 3fc49f6..7186585 100644
--- a/roles/workstation/tasks/os_archlinux.yml
+++ b/roles/workstation/tasks/os_archlinux.yml
@@ -34,6 +34,9 @@
include_tasks: tlp.yml
when: ansible_form_factor in ["Laptop", "Notebook"]
+- name: include virtualization setup
+ include_tasks: libvirt.yml
+
- name: retrieve installed packages
package_facts:
register: package_facts
remember that computers suck.