aboutsummaryrefslogtreecommitdiffstats
path: root/roles/workstation/tasks
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2022-01-07 09:46:13 +0100
committerRomain Gonçalves <me@rgoncalves.se>2022-01-07 19:43:54 +0100
commitd09a32e0f7699890908dae947667bcf4cf9dc8a7 (patch)
tree829c28ebd14d43c64f6b4472b3fbc2c821b5c8b1 /roles/workstation/tasks
parentb875334bfe0eb791fe2d88cd8a4365bddd077efd (diff)
downloadrules-d09a32e0f7699890908dae947667bcf4cf9dc8a7.tar.gz
roles/workstation: Scaffold libvirt on archlinux
Diffstat (limited to 'roles/workstation/tasks')
-rw-r--r--roles/workstation/tasks/libvirt.yml17
-rw-r--r--roles/workstation/tasks/os_archlinux.yml3
2 files changed, 20 insertions, 0 deletions
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.