Jinja2 Loops
Example ! #### Script1 #### from __future__ import unicode_literals, print_function from jinja2 import FileSystemLoader, StrictUndefined from jinja2.environment import Environment env = Environment(undefined=StrictUndefined) env.loader = FileSystemLoader([“.”, “./templates/”]) var_interfaces = {} var_template_file = “intf_config1.j2” var_template = env.get_template(var_template_file) var_output = var_template.render(**var_interfaces) print(var_output) ####…
Read more