op inject confusion
curly brackets galore
i’ve been using 1password for personal credential management in config files for about as long as they’ve made it available. i had a bit of yaml that i needed to inject some credentials into. the yaml (unhelpfully) required that i stick some template variables into the mix to render some notifications.
since i need to run this through a op inject -i foo.tmplt > out.yml
pipeline,
there was a conflict with the replacement. op inject
instead of limiting
itself to the op://
template contents that you’d naively expect it to, ingests
pretty much everything with a mustache.
this means that you need to wrap everything else with {{ "your_shiz_here" }}
literals in order for it to pass through the bowels of op inject
appropriately.
this is, to be fair, reasonably covered in the docs.
i’m writing this down so i can re-forget/remember this in the future.
if i’ve saved future me any hassle here, you’re welcome.