Check jinja templates for syntax error (#10667)
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.
This commit is contained in:
@ -27,6 +27,14 @@ ansible-lint:
|
||||
- ansible-lint -v
|
||||
except: ['triggers', 'master']
|
||||
|
||||
jinja-syntax-check:
|
||||
extends: .job
|
||||
stage: unit-tests
|
||||
tags: [light]
|
||||
script:
|
||||
- "find -name '*.j2' -exec tests/scripts/check-templates.py {} +"
|
||||
except: ['triggers', 'master']
|
||||
|
||||
syntax-check:
|
||||
extends: .job
|
||||
stage: unit-tests
|
||||
|
Reference in New Issue
Block a user