This bug was originally filed in Launchpad as LP: #1962759
Launchpad details
affected_projects = []
assignee = thetoolsmith
assignee_name = paul bruno
date_closed = 2022-05-18T16:51:42.036870+00:00
date_created = 2022-03-02T15:48:24.887425+00:00
date_fix_committed = 2022-03-03T20:51:14.058089+00:00
date_fix_released = 2022-05-18T16:51:42.036870+00:00
id = 1962759
importance = medium
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1962759
milestone = None
owner = thetoolsmith
owner_name = paul bruno
private = False
status = fix_released
submitter = thetoolsmith
submitter_name = paul bruno
tags = []
duplicates = []
Launchpad user paul bruno(thetoolsmith) wrote on 2022-03-02T15:48:24.887425+00:00
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.
This bug was originally filed in Launchpad as LP: #1962759
Launchpad details
Launchpad user paul bruno(thetoolsmith) wrote on 2022-03-02T15:48:24.887425+00:00
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.