From f96800051b9a812bdd606dcbc7bfeeda611ddd91 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Wed, 13 Apr 2022 16:45:16 +0000 Subject: [PATCH] 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. --- roles/kvm_host/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/kvm_host/tasks/main.yml b/roles/kvm_host/tasks/main.yml index da6ca8e..99c3df8 100644 --- a/roles/kvm_host/tasks/main.yml +++ b/roles/kvm_host/tasks/main.yml @@ -1,4 +1,16 @@ --- +- 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 }}"