Ansible repository with playbooks to manage azure objects
Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- #!/usr/bin/env python3
- # filename: check_jinja_syntax.py
- import sys
- import os
- from jinja2 import Environment, FileSystemLoader
-
- #for arg in sys.argv:
- # print(arg)
- env = Environment(loader=FileSystemLoader(sys.argv[1]))
- #templates = []
- #for x in env.list_templates():
- # if x.endswith('.j2'):
- # templates.append(x)
- templates = [x for x in env.list_templates() if x.endswith('.j2')]
- for template in templates:
- print(template)
- t = env.get_template(template)
- env.parse(t)
|