make kernel command line options configurable.
[noc.git] / ansible / roles / base / tasks / 07grub.yml
1 ---
2 - name: set kernel command line options
3   lineinfile:
4     path: /etc/default/grub
5     regexp: '^#?GRUB_CMDLINE_LINUX='
6     line: 'GRUB_CMDLINE_LINUX="{% for opt,val in (install.kernel_cmdline | default({})).items() %}{{ opt }}={{ val }}{% if not loop.last %} {% endif %}{% endfor %}"'
7   when: install is defined and install.kernel_cmdline is defined