Add support for systemd and postfix config files
All checks were successful
CI / test (push) Successful in 50s
Lint / test (push) Successful in 29s
Trivy / test (push) Successful in 23s

This commit is contained in:
Miguel Jacq 2026-01-06 11:57:50 +11:00
parent 8f7f48dc91
commit 2f77cd4d80
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
10 changed files with 521 additions and 8 deletions

View file

@ -127,12 +127,12 @@ jinjaturtle php.ini \
## Full usage info
```
usage: jinjaturtle [-h] -r ROLE_NAME [-f {json,ini,toml,yaml,xml}] [-d DEFAULTS_OUTPUT] [-t TEMPLATE_OUTPUT] config
usage: jinjaturtle [-h] -r ROLE_NAME [-f {json,ini,toml,yaml,xml,postfix,systemd}] [-d DEFAULTS_OUTPUT] [-t TEMPLATE_OUTPUT] config
Convert a config file into Ansible inventory and a Jinja2 template.
positional arguments:
config Path to the source configuration file (TOML or INI-style).
config Path to the source configuration file.
options:
-h, --help show this help message and exit
@ -146,6 +146,15 @@ options:
Path to write the Jinja2 config template. If omitted, template is printed to stdout.
```
## Additional supported formats
JinjaTurtle can also template some common "bespoke" config formats:
- **Postfix main.cf** (`main.cf`) → `--format postfix`
- **systemd unit files** (`*.service`, `*.socket`, etc.) → `--format systemd`
For ambiguous extensions like `*.conf`, JinjaTurtle uses lightweight content sniffing; you can always force a specific handler via `--format`.
## Found a bug, have a suggestion?