From ee8ef12881d590de74c4279d04f0a88262beba9d Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Wed, 20 Nov 2019 10:46:26 +0000 Subject: [PATCH] Set screen resolution in FreeBSD on KVM --- roles/freebsd/files/screen-qemu.conf | 10 ++++++++++ roles/freebsd/tasks/xorg.yml | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 roles/freebsd/files/screen-qemu.conf diff --git a/roles/freebsd/files/screen-qemu.conf b/roles/freebsd/files/screen-qemu.conf new file mode 100644 index 0000000..dfb17b7 --- /dev/null +++ b/roles/freebsd/files/screen-qemu.conf @@ -0,0 +1,10 @@ +Section "Screen" + Identifier "Screen0" + Device "Card0" + Monitor "Monitor0" + SubSection "Display" + Viewport 0 0 + Depth 24 + Modes "1024x768" + EndSubSection +EndSection diff --git a/roles/freebsd/tasks/xorg.yml b/roles/freebsd/tasks/xorg.yml index a0a7684..85c8f89 100644 --- a/roles/freebsd/tasks/xorg.yml +++ b/roles/freebsd/tasks/xorg.yml @@ -16,3 +16,9 @@ copy: src: keyboard-gb.conf dest: /usr/local/etc/X11/xorg.conf.d/keyboard-gb.conf +- name: Set xorg screen size for kvm/qemu + become: true + copy: + src: screen-qemu.conf + dest: /usr/local/etc/X11/xorg.conf.d/screen-qemu.conf + when: ansible_virtualization_role == "guest" and ansible_virtualization_type == "kvm"