Skip to content

Commit

Permalink
Add custom TLS config per Raft peer
Browse files Browse the repository at this point in the history
  • Loading branch information
Amine Hajali committed Jan 27, 2025
1 parent d2735bf commit dcaa76b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,12 @@ vault_raft_cluster_members: |
{% for server in groups[vault_raft_group_name] %}
{
"peer": "{{ server }}",
"api_addr": "{{ hostvars[server]['vault_api_addr'] |
default(vault_protocol + '://' +
"api_addr": "{{ hostvars[server]['vault_api_addr'] | default(vault_protocol + '://' +
hostvars[server]['ansible_' + hostvars[server]['ansible_default_ipv4']['interface']]['ipv4']['address'] + ':' + (vault_port|string)) }}",
"tls_ca_file": {{ vault_tls_certs_path }} + {{ server }} + '.int.jusmundi.com.pem',
"tls_cert_file": {{ vault_tls_certs_path }} + {{ server }} + '.int.jusmundi.com.pem',
"tls_key_file": {{ vault_tls_certs_path }} + {{ server }} + '.int.jusmundi.com.key'
},
"tls_ca_file": "{{ vault_tls_certs_path }}/{{ server }}.int.jusmundi.com.pem",
"tls_cert_file": "{{ vault_tls_certs_path }}/{{ server }}.int.jusmundi.com.pem",
"tls_key_file": "{{ vault_tls_certs_path }}/{{ server }}.int.jusmundi.com.key"
}{% if not loop.last %},{% endif %}
{% endfor %}
]
Expand Down

0 comments on commit dcaa76b

Please sign in to comment.