ansible/roles/kvm_host/tasks/main.yml
Timo Makinen f96800051b kvm_host: Disable bluetooth kernel modules
Some IoT devices communicate through bluetooth so adapters are required
for host machines and passed through to virtual machines.

This patch prevents host to bluetooth kernel modules so adapters are not
in use and available for virtual machines.
2022-04-13 16:45:16 +00:00

51 lines
1 KiB
YAML

---
- name: disable bluetooth
ansible.builtin.copy:
dest: /etc/modprobe.d/disable-bluetooth.conf
content: |
blacklist bnep
blacklist bluetooth
blacklist btintel
blacklist btusb
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
- name: install kvm qemu packages
ansible.builtin.package:
name: "{{ item }}"
state: installed
with_items:
- libvirt
- libvirt-daemon
- nss-tools
- qemu-kvm
- virt-install
- virt-top
- name: create data directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: 0770
owner: root
group: qemu
with_items:
- /export/libvirt
- /export/libvirt/hdd
- /export/libvirt/ssd
- name: link data directory
ansible.builtin.file:
src: /export/libvirt
dest: /srv/libvirt
state: link
owner: root
group: "{{ ansible_wheel }}"
follow: false
- name: enable libvirt service
ansible.builtin.service:
name: libvirtd
state: started
enabled: true