yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #88897
[Bug 1962759] Re: jinja-template doesn't support 'do' extension.
This bug is believed to be fixed in cloud-init in version 22.2. If this
is still a problem for you, please make a comment and set the state back
to New
Thank you.
** Changed in: cloud-init
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1962759
Title:
jinja-template doesn't support 'do' extension.
Status in cloud-init:
Fix Released
Bug description:
example user-data file with jinja
## template: jinja
#!/bin/sh
{% set data_result = [] %}
{% set data_input = [1,2,3] %}
{% for i in data_input %}
{% do data_result.append(i) %}
{% endfor %}
echo results: {{data_result}} >>results.out
The following exception is thrown when using jinja2 'do' statement.
jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'do'.
Jinja was looking for the following tags: 'endfor' or 'else'. The
innermost block that needs to be closed is 'for'.
I'm using cloud-init from a 64bitencoded file passed into terraform
azure provider custom_data.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1962759/+subscriptions
References