1 Technical_Decomp_JinjaTurtle
Miguel Jacq edited this page 2025-12-27 20:49:51 -06:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

enroll/jinjaturtle.py

JinjifyResult (frozen dataclass)

Purpose: result of running the external jinjaturtle CLI tool on a config file.

Fields:

  • template_text: Jinja2 template content
  • vars_text: YAML mapping text (no leading --- expected)

Lifecycle / where its used:

  • manifest._jinjify_managed_files() calls run_jinjaturtle(...).
  • If successful:
    • template is written into roles//templates/<src_rel>.j2
    • vars are merged into role defaults (single-site) or host_vars (multi-site)
  • If jinjaturtle fails for a file, it silently skips templating that file (manifest remains optimistic/non-interactive).