{{ ansible_managed | comment }} {% set title = { 'latest': 'Linux (latest)', 'lts': 'Linux (LTS)', }[flavour] %} {% set vmlinuz = { 'latest': '/vmlinuz-linux', 'lts': '/vmlinuz-linux-lts', }[flavour] %} {% set initrd = { 'latest': '/initramfs-linux.img', 'lts': '/initramfs-linux-lts.img', }[flavour] %} title {{ title }} linux {{ vmlinuz }} initrd {{ initrd }} {% set common_options = {'quiet': true} %} {% set options = common_options | ansible.builtin.combine(ansible_facts['cmdline']) %} options {%- for key in options if key != 'initrd' -%} {%- if options[key] is boolean %} {{ key }} {%- else %} {{ key }}={{ options[key] }} {%- endif -%} {%- endfor -%}