Hi,
we have vault agent template stanza like :
template {
source = "/opt/vault/secrets/templates/consul-systemd.service.ctmpl"
destination = "/etc/systemd/system/consul.service"
create_dest_dirs = false
error_on_missing_key = true
perms = 0644
backup = true
exec = {
command = ["/opt/vault/scripts/systemd-reloader", "consul"]
timeout = "30s"
}
}
error log :
root@ip-10-9-216-18:/opt/vault# /opt/vault/bin/vault agent -config /opt/vault/config/default.hcl -log-level=info
Error loading configuration from /opt/vault/config/default.hcl: error parsing 'template': 1 error(s) decoding:
* 'exec' expected a map, got 'slice'
trying another template :
...
template {
source = "/opt/vault/secrets/templates/consul-systemd.service.ctmpl"
destination = "/etc/systemd/system/consul.service"
create_dest_dirs = false
error_on_missing_key = true
perms = 0644
backup = true
exec {
command = "/opt/vault/scripts/systemd-reloader consul"
timeout = "30s"
}
}
...
still have same error too,
anyone can help us to configure correct exec config ?
based on the docs https://www.vaultproject.io/docs/agent/template#exec seem the former is the correct one, but no luck