summaryrefslogtreecommitdiff
path: root/ansible/roles/vmhost/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/vmhost/tasks/main.yml')
-rw-r--r--ansible/roles/vmhost/tasks/main.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/ansible/roles/vmhost/tasks/main.yml b/ansible/roles/vmhost/tasks/main.yml
index e3dc288..59768f1 100644
--- a/ansible/roles/vmhost/tasks/main.yml
+++ b/ansible/roles/vmhost/tasks/main.yml
@@ -6,8 +6,16 @@
- virt-manager
- libvirt-daemon-system
- libvirt-clients
+ - libnss-libvirt
- name: "enable nested KVM if possible"
copy:
src: kvm-nested.conf
dest: /etc/modprobe.d/kvm-nested.conf
+
+- name: "add libvirt_guest to /etc/nsswitch.conf"
+ shell: |
+ if awk '$1 == "hosts:" && !/libvirt_guest/' /etc/nsswitch.conf | grep .
+ then
+ sed -i '/hosts:/s/files /files libvirt_guest /' /etc/nsswitch.conf
+ fi