From 9d418407bfc561708b5ad3a5264ed5ec0f728b70 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Thu, 10 Aug 2023 19:35:26 +0200 Subject: [PATCH] Enable libvirtd after installation, install nfs-utils --- roles/libvirt/handlers/main.yml | 7 ------- roles/libvirt/tasks/main.yml | 9 +++++++-- roles/vagrant/tasks/main.yml | 1 + 3 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 roles/libvirt/handlers/main.yml diff --git a/roles/libvirt/handlers/main.yml b/roles/libvirt/handlers/main.yml deleted file mode 100644 index 8e0d522..0000000 --- a/roles/libvirt/handlers/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Enable libvirtd service - ansible.builtin.systemd: - name: libvirtd - enabled: true - state: started - scope: system diff --git a/roles/libvirt/tasks/main.yml b/roles/libvirt/tasks/main.yml index b80c202..993832d 100644 --- a/roles/libvirt/tasks/main.yml +++ b/roles/libvirt/tasks/main.yml @@ -36,7 +36,6 @@ backrefs: true backup: true when: "'libvirt libvirt_guest' not in nsswitch_content" - notify: Enable libvirtd service - name: Create session pool dir ansible.builtin.file: @@ -44,7 +43,6 @@ state: directory mode: 0755 - - name: Define session pool community.libvirt.virt_pool: command: define @@ -63,3 +61,10 @@ autostart: true name: "{{ pool_name }}" uri: "qemu:///session" + +- name: Start and enable libvirtd service + become: true + ansible.builtin.systemd: + name: libvirtd + enabled: true + state: started diff --git a/roles/vagrant/tasks/main.yml b/roles/vagrant/tasks/main.yml index 6c14d09..1309069 100644 --- a/roles/vagrant/tasks/main.yml +++ b/roles/vagrant/tasks/main.yml @@ -4,6 +4,7 @@ community.general.pacman: name: - vagrant + - nfs-utils when: ansible_facts['distribution'] == 'Archlinux' - name: Install packages (Debian)