Easy templating with Python and Jinja

At work, I’ve been using both Golang and Ruby to render Nomad jobspec files in a consistent manner across environments. But Python is my one true love and I wanted to learn how to do it in Python. Turns out I already knew how… you can do it in Jinja2! I’ve used Jinja2 in the past a lot for Django and Ansible, so this was pretty easy to pick up. Here are some notes for future me when I want to inevitably do this again....

2023-07-04