2024-01-05 22:58:30 +00:00
|
|
|
---
|
|
|
|
# hashistack configuration merging for vault
|
2024-01-24 22:54:58 +00:00
|
|
|
- name: "Vault | Merge listener configuration"
|
2024-01-06 14:50:51 +00:00
|
|
|
ansible.builtin.set_fact:
|
|
|
|
vault_listener_configuration: "{{
|
|
|
|
vault_listener_configuration |
|
|
|
|
combine((vault_enable_tls | bool) | ternary(vault_tls_listener_configuration, {})) |
|
|
|
|
combine(vault_extra_listener_configuration | default({}))
|
|
|
|
}}"
|
|
|
|
|
2024-01-24 22:54:58 +00:00
|
|
|
- name: "Vault | Merge service registration configuration"
|
2024-01-06 14:50:51 +00:00
|
|
|
vars:
|
|
|
|
_config_to_merge:
|
|
|
|
service_registration: "{{ vault_service_registration_configuration }}"
|
2024-01-05 22:58:30 +00:00
|
|
|
ansible.builtin.set_fact:
|
2024-01-06 14:50:51 +00:00
|
|
|
hashi_vault_configuration: "{{
|
|
|
|
hashi_vault_configuration |
|
|
|
|
combine(_config_to_merge)
|
|
|
|
}}"
|
2024-01-05 22:58:30 +00:00
|
|
|
when: vault_enable_service_registration
|
2024-01-06 14:50:51 +00:00
|
|
|
|
2024-01-24 22:54:58 +00:00
|
|
|
- name: "Vault | Merge plugins configuration"
|
2024-01-06 14:50:51 +00:00
|
|
|
vars:
|
|
|
|
_config_to_merge:
|
|
|
|
plugin_directory: "{{ vault_plugin_directory }}"
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
hashi_vault_configuration: "{{
|
|
|
|
hashi_vault_configuration |
|
|
|
|
combine(_config_to_merge)
|
|
|
|
}}"
|
|
|
|
when: vault_enable_plugins
|
2024-01-06 23:57:29 +00:00
|
|
|
|
2024-01-24 22:54:58 +00:00
|
|
|
- name: "Vault | Merge logging configuration"
|
2024-01-06 23:57:29 +00:00
|
|
|
vars:
|
|
|
|
_config_to_merge: "{{ vault_logging_configuration }}"
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
hashi_vault_configuration: "{{
|
|
|
|
hashi_vault_configuration |
|
|
|
|
combine(_config_to_merge)
|
|
|
|
}}"
|
|
|
|
when: vault_enable_log_to_file
|
2024-01-24 22:54:58 +00:00
|
|
|
|
|
|
|
- name: "Vault | Merge extra configuration settings"
|
|
|
|
vars:
|
|
|
|
_config_to_merge: "{{ vault_extra_configuration }}"
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
hashi_vault_configuration: "{{
|
|
|
|
hashi_vault_configuration |
|
|
|
|
combine(_config_to_merge)
|
|
|
|
}}"
|
|
|
|
when: vault_extra_configuration is defined
|