Check group-vars Jinja syntax in pre-commit

Port the syntax-only checker from MASH PR #3613, including its hook triggers and YAML diagnostics. Check both group_vars/matrix_servers and group_vars/jitsi_jvb_servers when either file, the checker, or the hook configuration changes.

Source: https://github.com/mother-of-all-self-hosting/mash-playbook/pull/3613

Co-authored-by: QEDeD <pope-jellied-hull@duck.com>
This commit is contained in:
Slavi Pantaleev
2026-10-21 15:59:25 +03:00
co-authored by QEDeD
parent 8a2968670e
commit 053ee6a755
2 changed files with 73 additions and 0 deletions
+8
View File
@@ -32,6 +32,14 @@ repos:
pass_filenames: false
- repo: local
hooks:
- id: check-group-vars-jinja
name: Check the Jinja syntax in group_vars
entry: bin/check-group-vars-jinja.py
language: python
additional_dependencies: ['jinja2==3.1.6', 'pyyaml==6.0.3']
files: '^(group_vars/(matrix_servers|jitsi_jvb_servers)|bin/check-group-vars-jinja\.py|\.pre-commit-config\.yaml)$'
args: ['group_vars/matrix_servers', 'group_vars/jitsi_jvb_servers']
pass_filenames: false
- id: check-examples-vars-migration-version
name: Check examples/vars.yml migration version matches expected
entry: bin/check-examples-vars-migration-version.sh