From 9c4f64ded57c36e4f96fd331aaa6714bce1889eb Mon Sep 17 00:00:00 2001 From: nicoo Date: Sun, 13 Jan 2019 00:02:33 +0100 Subject: [PATCH] ansible: Make install.kernel_cmdline a list Not all kernel command-line parameters look like key=value. --- ansible/host_vars/gnocchi0/main.yml | 2 +- ansible/host_vars/gnocchi1/main.yml | 2 +- ansible/roles/base/tasks/07grub.yml | 2 +- ansible/usb-install.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/host_vars/gnocchi0/main.yml b/ansible/host_vars/gnocchi0/main.yml index 84b2417..7d46862 100644 --- a/ansible/host_vars/gnocchi0/main.yml +++ b/ansible/host_vars/gnocchi0/main.yml @@ -12,4 +12,4 @@ install: disks: primary: /dev/disk/by-id/ata-KINGSTON_SMS200S360G_50026B726A0002A2 kernel_cmdline: - console: "ttyS0,115200n8" + - console=ttyS0,115200n8 diff --git a/ansible/host_vars/gnocchi1/main.yml b/ansible/host_vars/gnocchi1/main.yml index 12fddef..6ecab28 100644 --- a/ansible/host_vars/gnocchi1/main.yml +++ b/ansible/host_vars/gnocchi1/main.yml @@ -12,4 +12,4 @@ install: disks: primary: /dev/disk/by-id/ata-KINGSTON_SMS200S360G_50026B726A00DFF4 kernel_cmdline: - console: "ttyS0,115200n8" + - console=ttyS0,115200n8 diff --git a/ansible/roles/base/tasks/07grub.yml b/ansible/roles/base/tasks/07grub.yml index a52f542..2a2dda7 100644 --- a/ansible/roles/base/tasks/07grub.yml +++ b/ansible/roles/base/tasks/07grub.yml @@ -3,6 +3,6 @@ lineinfile: path: /etc/default/grub regexp: '^#?GRUB_CMDLINE_LINUX=' - line: 'GRUB_CMDLINE_LINUX="{{ map(lambda opt, val: opt + "=" + val, (install.kernel_cmdline or {}).items()).join(" ") }}"' + line: 'GRUB_CMDLINE_LINUX="{{ (install.kernel_cmdline or []).join(" ") }}"' when: install is defined and install.kernel_cmdline is defined notify: update grub diff --git a/ansible/usb-install.yml b/ansible/usb-install.yml index d5730d9..985e560 100644 --- a/ansible/usb-install.yml +++ b/ansible/usb-install.yml @@ -49,7 +49,7 @@ LABEL linux KERNEL linux INITRD initrd.preseed.gz - APPEND install {{ map(lambda opt, val: opt + ' ' + val, (install.kernel_cmdline or {}).items()).join(' ') }} + APPEND install {{ (install.kernel_cmdline or []).join(' ') }} - name: Make the USB disk bootable pause: -- 1.7.10.4