Skip to content

Templating

Jinja

konfigadm can execute Jinja style templates using the pongo2 library

config.yml

templates:
  /etc/package-list: file.tpl

file.tpl

{% for pkg in packages %}
Installed package: {{pkg}}
{% endfor %}

YAML tags

Env

The env tag will fill the environment variable value of $AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

aws:
  accessKey: !!env AWS_ACCESS_KEY_ID
  secretKey: !!env AWS_SECRET_ACCESS_KEY

Templates

You can use any template function defined by gomplate.

foo: !!template "{{ base64.Encode \"bar\" }}"