Allow to fail early (pre-commit time) for jinja error, rather than waiting until executing the playbook and the invalid template. I could not find a simple jinja pre-commit hook in the wild.
10 lines
174 B
Python
Executable File
10 lines
174 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import sys
|
|
from jinja2 import Environment
|
|
|
|
env = Environment()
|
|
for template in sys.argv[1:]:
|
|
with open(template) as t:
|
|
env.parse(t.read())
|