I'm currently using if...else.. statements to wrap my code but it would be easier if I could just set defaults instead. Is there any way to set a default value if an environment variable is not set?
minutes: {{ 5 | 'INTERVAL' | env }}
When I try this I get an error:
File "config/base.j2", line 9, in template
minutes: {{ 5 | 'INTERVAL' | env }}
jinja2.exceptions.TemplateSyntaxError: expected token 'name', got 'string'
I'm currently using if...else.. statements to wrap my code but it would be easier if I could just set defaults instead. Is there any way to set a default value if an environment variable is not set?
minutes: {{ 5 | 'INTERVAL' | env }}
When I try this I get an error: