from jinja2 import FilesystemLoader,Environment
loader FileSystemLoader('templates') environment Environment(loader=loader) tpl environment.get_template('vars.conf.tpl') data={'ip', '1.1.1.1'} output tpl.render(data=data) print(output)
logging host {{ data.ip }}