我正在使用ansible来解析一个jinja2模板。jinja2模板有一段代码,它应该遍历一个变量,该变量是一个字典列表。但是,它将字典列表视为字符串并打印单个字符。对j2模板中的字典列表进行循环的代码: {% for subscriber in subscribers %}
{% for dict_item in subscriber['filter_policyblah.com&quo
代码基本上尝试使用jinja2模板呈现设备配置。/templates/jinja2/JuniperLerConfigTemplate", line 71, in top-level template code
{%- for tBgpGrp在expect语句中使用print语句,我看到在迭代期间在字典中添加了一个额外的组对象(带有'default')。根据我的YAML配置,应该只有一个这样的组对象。print()语句,我可以看到,