From d09a32e0f7699890908dae947667bcf4cf9dc8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Fri, 7 Jan 2022 09:46:13 +0100 Subject: roles/workstation: Scaffold libvirt on archlinux --- roles/workstation/tasks/libvirt.yml | 17 +++++++++++++++++ roles/workstation/tasks/os_archlinux.yml | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 roles/workstation/tasks/libvirt.yml (limited to 'roles/workstation/tasks') 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 -- cgit v1.2.3