install:
disks:
primary: /dev/disk/by-id/ata-KINGSTON_SMS200S360G_50026B726A0002A2
+ kernel_cmdline:
+ vga: "off"
+ console: "ttyS0,115200n8"
install:
disks:
primary: /dev/disk/by-id/ata-KINGSTON_SMS200S360G_50026B726A00DFF4
+ kernel_cmdline:
+ vga: "off"
+ console: "ttyS0,115200n8"
--- /dev/null
+---
+- name: set kernel command line options
+ lineinfile:
+ path: /etc/default/grub
+ regexp: '^#?GRUB_CMDLINE_LINUX='
+ line: 'GRUB_CMDLINE_LINUX="{% for opt,val in (install.kernel_cmdline | default({})).items() %}{{ opt }}={{ val }}{% if not loop.last %} {% endif %}{% endfor %}"'
+ when: install is defined and install.kernel_cmdline is defined
import_tasks: 04systemd.yml
- import_tasks: 05tools.yml
- import_tasks: 06net.yml
+- import_tasks: 07grub.yml
LABEL linux
KERNEL linux
INITRD initrd.preseed.gz
- APPEND install vga=off console=ttyS0,115200n8
+ APPEND install{% for opt,val in (install.kernel_cmdline | default({})).items() %} {{ opt }}={{ val }}{% endfor %}
- name: Make the USB disk bootable
pause: