From ad2bf6ebb66999726619a19a90dc3e39afb5cb95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Wed, 23 Oct 2024 15:25:12 +0200 Subject: [PATCH 1/3] Refs #8025: Refactor-awx - Blacklist task - Add module to blacklist.conf --- roles/debian-qemu/defaults/main.yml | 2 ++ roles/debian-qemu/tasks/blacklist.yml | 7 +++++++ roles/debian-qemu/tasks/main.yml | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 roles/debian-qemu/tasks/blacklist.yml diff --git a/roles/debian-qemu/defaults/main.yml b/roles/debian-qemu/defaults/main.yml index 1319b37..05bf5ec 100644 --- a/roles/debian-qemu/defaults/main.yml +++ b/roles/debian-qemu/defaults/main.yml @@ -4,3 +4,5 @@ autofs_packages: - autofs - libnfs-utils - autofs-ldap +blacklist: | + blacklist snd_hda_intel diff --git a/roles/debian-qemu/tasks/blacklist.yml b/roles/debian-qemu/tasks/blacklist.yml new file mode 100644 index 0000000..8d2fb8f --- /dev/null +++ b/roles/debian-qemu/tasks/blacklist.yml @@ -0,0 +1,7 @@ +- name: Configure blacklist modprobe on VM + copy: + content: "{{ blacklist }}" + dest: /etc/modprobe.d/blacklist.conf + owner: root + group: root + mode: u=rw,g=r,o=r \ No newline at end of file diff --git a/roles/debian-qemu/tasks/main.yml b/roles/debian-qemu/tasks/main.yml index ec83e1e..bcb11ce 100644 --- a/roles/debian-qemu/tasks/main.yml +++ b/roles/debian-qemu/tasks/main.yml @@ -4,3 +4,5 @@ tags: hotplug - import_tasks: autofs.yml tags: autofs +- import_tasks: blacklist.yml + tags: blacklist From e20f75a6face3c2d543f191f5455224206231ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Wed, 23 Oct 2024 15:28:32 +0200 Subject: [PATCH 2/3] Refs #8025: Refactor-awx - Blacklist task - change variable name to be more consistent --- roles/debian-qemu/defaults/main.yml | 2 +- roles/debian-qemu/tasks/blacklist.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/debian-qemu/defaults/main.yml b/roles/debian-qemu/defaults/main.yml index 05bf5ec..dc2a884 100644 --- a/roles/debian-qemu/defaults/main.yml +++ b/roles/debian-qemu/defaults/main.yml @@ -4,5 +4,5 @@ autofs_packages: - autofs - libnfs-utils - autofs-ldap -blacklist: | +blacklist_module_kernel: | blacklist snd_hda_intel diff --git a/roles/debian-qemu/tasks/blacklist.yml b/roles/debian-qemu/tasks/blacklist.yml index 8d2fb8f..0cd674e 100644 --- a/roles/debian-qemu/tasks/blacklist.yml +++ b/roles/debian-qemu/tasks/blacklist.yml @@ -1,6 +1,6 @@ - name: Configure blacklist modprobe on VM copy: - content: "{{ blacklist }}" + content: "{{ blacklist_module_kernel }}" dest: /etc/modprobe.d/blacklist.conf owner: root group: root From e2c377a189362b350280ed1ca37eb451694d21ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavi=20Lle=C3=B3=20Tom=C3=A1s?= Date: Fri, 25 Oct 2024 13:21:21 +0200 Subject: [PATCH 3/3] Refs #8025: Refactor-awx - rol Debian-qemu - Task blacklist. Change file destination vn-blacklist.conf --- roles/debian-qemu/tasks/blacklist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/debian-qemu/tasks/blacklist.yml b/roles/debian-qemu/tasks/blacklist.yml index 0cd674e..7076911 100644 --- a/roles/debian-qemu/tasks/blacklist.yml +++ b/roles/debian-qemu/tasks/blacklist.yml @@ -1,7 +1,7 @@ - name: Configure blacklist modprobe on VM copy: content: "{{ blacklist_module_kernel }}" - dest: /etc/modprobe.d/blacklist.conf + dest: /etc/modprobe.d/vn-blacklist.conf owner: root group: root mode: u=rw,g=r,o=r \ No newline at end of file