I have a block that looks like this:
{% if grains['function'] == 'production' %}
{% set conf_src = "prod.yml.ninja" %}
{% elif grains['function'] == 'staging'] %}
{% set conf_src = "staging.yml.ninja" %}
{% elif grains['function'] == 'dev'] %}
{% set conf_src = "dev.yml.ninja" %}
{% endif %}
Is there any way to do something like
{%
if grains['function'] == 'production'
set conf_src = "prod.yml.ninja"
elif grains['function'] == 'staging'
set conf_src = "staging.yml.ninja"
elif grains['function'] == 'dev'
set conf_src = "dev.yml.ninja"
endif
%}
So I can just open the block once?