not need to set a default for install.kernel_cmdline because is skipped if the varaib...
authorChristian Pointner <equinox@realraum.at>
Sat, 12 Jan 2019 23:19:33 +0000 (00:19 +0100)
committerChristian Pointner <equinox@realraum.at>
Sat, 12 Jan 2019 23:19:33 +0000 (00:19 +0100)
ansible/roles/base/tasks/07grub.yml

index 2a2dda7..4aa2122 100644 (file)
@@ -3,6 +3,6 @@
   lineinfile:
     path: /etc/default/grub
     regexp: '^#?GRUB_CMDLINE_LINUX='
-    line: 'GRUB_CMDLINE_LINUX="{{ (install.kernel_cmdline or []).join(" ") }}"'
+    line: 'GRUB_CMDLINE_LINUX="{{ install.kernel_cmdline | join(" ") }}"'
   when: install is defined and install.kernel_cmdline is defined
   notify: update grub