Hi all, I’m running this task:
- name: assert version
fail:
msg: “‘vmlinuz-{{ kernel_version }}’ not found in default kernel output: ‘{{ default_kernel.stdout }}’”
when: ‘“vmlinuz-{{kernel_version}}” not in default_kernel.stdout’
The key part being that I want to have the fail message concatenate the string literal ‘vmlinuz-’ with the ‘kernel_version’ variable. When I do this, I get this error:
[WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: “vmlinuz-{{kernel_version}}”
not in default_kernel.stdout
What’s the appropriate way to do this?