fix: vault extra files list not being idempotent between runs

This commit is contained in:
Bertrand Lanson 2024-05-03 23:53:57 +02:00
parent b5614dfee0
commit 1c1730e5c9

View File

@ -60,11 +60,14 @@ hashi_vault_env_variables: {}
hashi_vault_config_dir: "/etc/vault.d"
hashi_vault_data_dir: "/opt/vault"
hashi_vault_extra_files: true
hashi_vault_extra_files_set:
"{{ (vault_certificates_extra_files_dir if vault_enable_tls else []) |
union(vault_plugin_extra_files_dir if vault_enable_plugins else []) |
union(vault_extra_files_list) |
list }}"
hashi_vault_extra_files_list: "{{ ([] +
(vault_certificates_extra_files_dir if vault_enable_tls else []) +
(vault_plugin_extra_files_dir if vault_enable_plugins else []) +
vault_extra_files_list)
| unique
| sort
}}"
hashi_vault_extra_files_src: "{{ sub_configuration_directories.vault_servers }}/config"
hashi_vault_extra_files_dst: "{{ hashi_vault_config_dir }}/config"
hashi_vault_extra_container_volumes: "{{ default_container_extra_volumes | union(extra_vault_container_volumes) | unique }}"