diff --git a/roles/vault_agent/templates/vault-agent.hcl.j2 b/roles/vault_agent/templates/vault-agent.hcl.j2 index cc22083..f0d628a 100644 --- a/roles/vault_agent/templates/vault-agent.hcl.j2 +++ b/roles/vault_agent/templates/vault-agent.hcl.j2 @@ -29,6 +29,20 @@ auto_auth { mode = 0600 } } +{% for sink in vault_agent_sinks %} + sink { + type = "file" +{% if sink.wrap_ttl is defined %} + wrap_ttl = "{{ sink.wrap_ttl }}" +{% endif %} + config { + path = "{{ sink.path }}" +{% if sink.mode is defined %} + mode = {{ sink.mode }} +{% endif %} + } + } +{% endfor %} } {% for template in vault_agent_templates %} @@ -50,7 +64,7 @@ template { {% if template.exec.timeout is defined %} timeout = "{{ template.exec.timeout }}" {% endif %} - command = "template.exec.command" + command = "{{ template.exec.command }}" } {% endif %} }