Skip to content

Instantly share code, notes, and snippets.

@virtualhobbit
Last active January 11, 2022 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virtualhobbit/f52bfd3ef79d8974e481ec05baba7bba to your computer and use it in GitHub Desktop.
Save virtualhobbit/f52bfd3ef79d8974e481ec05baba7bba to your computer and use it in GitHub Desktop.
pid_file = "/vault-agent/agent.pid"
vault {
address = "{{ vault_server }}"
tls_skip_verify = true
}
auto_auth {
method "approle" {
config = {
role_id_file_path = "/vault-agent/agent-role-id"
secret_id_file_path = "/vault-agent/agent-secret-id"
remove_secret_id_file_after_reading = false
}
}
sink "file" {
config = {
path = "/vault-agent/agent-token"
}
}
}
cache {
use_auto_auth_token = true
}
listener "tcp" {
address = "127.0.0.1:8100"
tls_disable = true
}
template {
source = "/vault-agent/vault-agentKey.ctmpl"
destination = "/vault-agent/{{ ansible_fqdn }}.key"
perms = 0600
}
template {
source = "/vault-agent/vault-agentCert.ctmpl"
destination = "/vault-agent/{{ ansible_fqdn }}.crt"
perms = 0644
command = /vault-agent/agent-script.sh"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment