From 7a3114b699e8d7b89cf1edb21e424c561fcd6b6c Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Wed, 27 Sep 2023 15:45:21 +0100 Subject: [PATCH] Disable color in bootloader for serial console --- roles/freebsd/tasks/main.yml | 2 +- roles/freebsd/tasks/qemu-guest.yml | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/roles/freebsd/tasks/main.yml b/roles/freebsd/tasks/main.yml index 50d0eb7..807eb32 100644 --- a/roles/freebsd/tasks/main.yml +++ b/roles/freebsd/tasks/main.yml @@ -22,6 +22,6 @@ - import_tasks: xorg.yml when: gui == true - import_tasks: qemu-guest.yml - when: gui == true and ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm" + when: ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm" - import_tasks: gnome.yml when: gui == true diff --git a/roles/freebsd/tasks/qemu-guest.yml b/roles/freebsd/tasks/qemu-guest.yml index b7d7959..c79565b 100644 --- a/roles/freebsd/tasks/qemu-guest.yml +++ b/roles/freebsd/tasks/qemu-guest.yml @@ -13,6 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Disable bootloader color + become: true + ansible.builtin.lineinfile: + path: /boot/loader.conf.d/qemu.conf + regexp: '^loader_color=.*' + line: 'loader_color="NO"' + create: yes - name: Install QEMU packages become: true community.general.pkgng: @@ -20,15 +27,18 @@ # xf86-video-scfb is needed for video acceleration and Gnome. name: utouch-kmod,xf86-input-evdev,xf86-video-scfb state: present + when: gui == true - name: Set xorg screen become: true ansible.builtin.copy: src: screen-qemu.conf dest: /usr/local/etc/X11/xorg.conf.d/screen-qemu.conf + when: gui == true - name: Enable utouch module become: true ansible.builtin.lineinfile: - path: /boot/loader.conf.d/utouch.conf + path: /boot/loader.conf.d/qemu.conf regexp: '^utouch_load=.*' line: 'utouch_load="YES"' create: yes + when: gui == true