ansible-hashicorp-vault/templates/config.hcl.j2
2023-10-29 15:39:20 +01:00

27 lines
713 B
Django/Jinja

storage "raft" {
path = "/opt/vault/raft/"
node_id = "{{ inventory_hostname }}"
{% for raft_peer in vault_raft_cluster_members | rejectattr('peer', 'equalto', inventory_hostname) %}
retry_join {
leader_api_addr = "{{ raft_peer.api_addr }}"
}
{% endfor %}
}
listener "tcp" {
address = "{{ vault_listener_address}}:{{vault_port}}"
cluster_address = "{{ vault_listener_address}}:8201"
tls_disable = 1
}
api_addr = "http://{{ vault_listener_address}}:{{vault_port}}"
cluster_addr = "http://{{ ansible_default_ipv4.address }}:8201"
ui= true
disable_mlock = true
service_registration "consul" {
address = "127.0.0.1:8500"
service_address = "{{ ansible_default_ipv4.address }}"
}