Add notes to the README about looping config
Some checks failed
CI / test (push) Failing after 39s
Lint / test (push) Failing after 25s
Trivy / test (push) Successful in 21s

This commit is contained in:
Miguel Jacq 2025-11-28 12:30:26 +11:00
parent f66f58a7bb
commit edd1acdabd
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9

View file

@ -29,9 +29,12 @@ TOML, YAML, INI, JSON and XML-style config files should be okay. There are alway
going to be some edge cases in very complex files that are difficult to work
with, though, so you may still find that you need to tweak the results.
The tool does not do anything intelligent like detect common sections that
could practically be turned into 'for' loops in Jinja. You'd have to do those
sorts of optimisations yourself.
For XML and YAML files, JinjaTurtle will attempt to generate 'for' loops
and lists in the Ansible yaml if the config file looks homogenous enough to
support it. However, if it lacks the confidence in this, it will fall back to
using scalar-style flattened attributes.
You may need or wish to tidy up the config to suit your needs.
The goal here is really to *speed up* converting files into Ansible/Jinja2,
but not necessarily to make it perfect.